Skip to content

Commit

Permalink
ci: update and fix jobs
Browse files Browse the repository at this point in the history
Signed-off-by: David Wallace <mypydavid@proton.me>
  • Loading branch information
David Wallace committed Feb 10, 2025
1 parent 6faee58 commit 8eb9a06
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 39 deletions.
87 changes: 49 additions & 38 deletions .github/workflows/build-test-codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,55 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [3.12]

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@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install -U pip
python3 -m pip install -U build
python3 -m pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=140 --statistics
- name: Build wheels
run: |
python3 -m build
# install the package in editable mode for the coverage report
python3 -m pip install -e .["pytest"]
- name: Generate coverage report
run: |
pytest --cov --cov-report=xml --cov-report=term-missing
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1

- name: raman_fitting run examples


run: |
raman_fitting run examples
- 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
2 changes: 1 addition & 1 deletion src/raman_fitting/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from raman_fitting.config.base_settings import Settings

settings = Settings()
settings = Settings()

0 comments on commit 8eb9a06

Please sign in to comment.