@@ -4,40 +4,50 @@ on: [push, pull_request]
44
55jobs :
66 build :
7-
87 runs-on : ubuntu-latest
98 strategy :
109 max-parallel : 4
1110 matrix :
12- python-version : [3.6, 3.7, 3.8]
11+ python-version : ['3.8', '3.9', '3.10', '3.11', '3.12'] # Updated to versions compatible with uv
1312 steps :
14- - uses : actions/checkout@v1
13+ - uses : actions/checkout@v4
1514 - name : Set up Python ${{ matrix.python-version }}
16- uses : actions/setup-python@v1
15+ uses : actions/setup-python@v5
1716 with :
1817 python-version : ${{ matrix.python-version }}
18+
19+ - name : Install uv
20+ run : curl -LsSf https://astral.sh/uv/install.sh | sh
21+ shell : bash
22+
1923 - name : Install dependencies
2024 run : |
21- python -m pip install --upgrade pip
22- pip install -r requirements.txt
23- - name : Install it
25+ source $HOME/.cargo/env # Ensure uv is in PATH for subsequent steps
26+ uv pip install --system -r requirements.txt
27+ uv pip install --system pytest pytest-cov # For running tests
28+
29+ - name : Install package
2430 run : |
25- python setup.py install
26- - name : Lint with flake8
31+ source $HOME/.cargo/env
32+ uv pip install --system .
33+
34+ - name : Lint with black
2735 run : |
28- pip install flake8
29- # stop the build if there are Python syntax errors or undefined names
30- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
31- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
32- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+ source $HOME/.cargo/env
37+ uv run black --check .
38+
3339 - name : Run pytest and Generate coverage report
3440 run : |
35- pip install pytest pytest-cov
36- python -m pytest --cov=argmark --cov-report=xml
41+ source $HOME/.cargo/env
42+ uv run pytest --cov=argmark --cov-report=xml
43+
3744 - name : Upload coverage to Codecov
38- uses : codecov/codecov-action@v1
45+ uses : codecov/codecov-action@v5
3946 with :
4047 token : ${{ secrets.CODECOV_TOKEN }}
4148 file : ./coverage.xml
42- name : codecov-umbrella
49+ name : codecov-umbrella # Optional: can be removed if not specifically needed
4350 fail_ci_if_error : true
51+ env : # Ensure environment variables are available if action needs them
52+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
53+ ` ` `
0 commit comments