Dev 081 #164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Lint Build Test Codecov | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main, pre-release ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: "Set up Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: "pyproject.toml" | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Lint with flake8 | |
run: | | |
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Run tests and generate coverage report | |
run: | | |
uv run pytest --cov --cov-report=xml --cov-report=term-missing | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
- name: Run examples | |
run: | | |
uv run raman_fitting run examples | |
build-docker: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- name: Build Docker image | |
run: docker build -t raman-fitting-image . | |
- name: Run Docker container | |
run: docker run -it raman-fitting-image |