@@ -2,9 +2,9 @@ name: Build and test
22
33on :
44 push :
5- branches : [main]
5+ branches : [main, master ]
66 pull_request :
7- branches : [main]
7+ branches : [main, master ]
88
99jobs :
1010 build :
1313 strategy :
1414 fail-fast : false
1515 matrix :
16- # Combined all environments into a single matrix job
1716 os : [ubuntu-latest, windows-latest, macos-latest]
1817 python-version : ["3.12"]
1918
@@ -30,30 +29,26 @@ jobs:
3029 run : uv python install ${{ matrix.python-version }}
3130
3231 - name : Install Project
33- # 'uv sync' automatically manages the virtual environment for you.
34- # We include dev dependencies for linting and testing .
32+ # This installs everything in [project.dependencies]
33+ # AND everything in [dependency-groups] dev .
3534 run : uv sync --all-extras --dev
3635
3736 - name : Lint with flake8
38- # We use 'uv run' to execute commands in the synced environment.
39- # This works consistently across Linux, Mac, and Windows.
37+ # We no longer need 'uv pip install flake8' here
4038 run : |
4139 uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4240 uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4341
4442 - name : Test with pytest
4543 timeout-minutes : 12
44+ shell : bash
4645 run : |
47- # If torchvision/torchinfo are not in your pyproject.toml,
48- # you can install them on the fly like this:
49- uv pip install torchvision torchinfo
50-
51- # Run pytest logic based on OS
46+ # Pytest and torch libraries are now pre-installed via uv sync
5247 if [ "${{ matrix.os }}" = "macos-latest" ]; then
5348 uv run pytest --ignore tests/deeplearning/test_hitters.py --ignore tests/deeplearning/test_mnist.py
5449 else
5550 uv run pytest
5651 fi
57- shell : bash # Using bash as a shell on all OSs (including Windows) makes if-statements easier
52+
5853
5954
0 commit comments