@@ -17,44 +17,55 @@ jobs:
1717 fail-fast : true
1818 matrix :
1919 os : [ ubuntu-latest, macos-latest, windows-latest ]
20- python-version : [3.12]
2120
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Install uv
25+ uses : astral-sh/setup-uv@v5
26+ with :
27+ enable-cache : true
28+ cache-dependency-glob : " uv.lock"
29+
30+ - name : " Set up Python"
31+ uses : actions/setup-python@v5
32+ with :
33+ python-version-file : " pyproject.toml"
34+
35+ - name : Install the project
36+ run : uv sync --all-extras --dev
37+
38+ - name : Lint with flake8
39+ run : |
40+ uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
41+
42+ - name : Run tests and generate coverage report
43+ run : |
44+ uv run pytest --cov --cov-report=xml --cov-report=term-missing
2245
46+ - name : Upload Coverage to Codecov
47+ uses : codecov/codecov-action@v5
48+ with :
49+ file : ./coverage.xml
50+ flags : unittests
51+ name : codecov-umbrella
52+ fail_ci_if_error : true
53+
54+ - name : Run examples
55+ run : |
56+ uv run raman_fitting run examples
57+
58+ build-docker :
59+ runs-on : ubuntu-latest
60+ needs : build
61+ strategy :
62+ fail-fast : true
2363 steps :
24- - uses : actions/checkout@v3
25-
26- - name : Set up Python ${{ matrix.python-version }}
27- uses : actions/setup-python@v4
28- with :
29- python-version : ${{ matrix.python-version }}
30-
31- - name : Install dependencies
32- run : |
33- python3 -m pip install -U pip
34- python3 -m pip install -U build
35- python3 -m pip install flake8
36-
37- - name : Lint with flake8
38- run : |
39- # stop the build if there are Python syntax errors or undefined names
40- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
41- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
42- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=140 --statistics
43-
44- - name : Build wheels
45- run : |
46- python3 -m build
47- # install the package in editable mode for the coverage report
48- python3 -m pip install -e .["pytest"]
49-
50- - name : Generate coverage report
51- run : |
52- pytest --cov --cov-report=xml --cov-report=term-missing
53- - name : Upload Coverage to Codecov
54- uses : codecov/codecov-action@v1
55-
56- - name : raman_fitting run examples
57-
58-
59- run : |
60- raman_fitting run examples
64+ - uses : actions/checkout@v4
65+ - uses : extractions/setup-just@v2
66+
67+ - name : Build Docker image
68+ run : docker build -t raman-fitting-image .
69+
70+ - name : Run Docker container
71+ run : docker run -it raman-fitting-image
0 commit comments