@@ -12,28 +12,40 @@ jobs:
1212 test :
1313 runs-on : ubuntu-latest
1414 strategy :
15+ fail-fast : false
1516 matrix :
16- python-version : ["3.10", "3.11", "3.12"]
17+ python-version : ["3.10", "3.12"]
18+
1719 steps :
1820 - uses : actions/checkout@v4
21+
1922 - uses : actions/setup-python@v5
2023 with :
2124 python-version : ${{ matrix.python-version }}
22- - name : Install
25+
26+ - name : Install dependencies
2327 run : |
24- python -m pip install -U pip
25- pip install -e ".[dev,test]" || pip install pytest pytest-cov
28+ python -m pip install --upgrade pip
29+ # install your package first
30+ pip install -e .
31+ # ensure test deps are present regardless of extras/lockfiles
32+ pip install pytest pytest-cov
33+ # CPU torch for both versions
2634 pip install --index-url https://download.pytorch.org/whl/cpu torch
27- - name : Tests + coverage
35+
36+ - name : Run tests with coverage
2837 run : |
2938 pytest -q --maxfail=1 --disable-warnings \
30- --cov=opensr_srgan --cov-report=xml
31- # Upload once (avoid 3 uploads from the matrix)
39+ --cov=opensr_srgan \
40+ --cov-report=term-missing \
41+ --cov-report=xml
42+
3243 - name : Upload coverage to Codecov
33- if : matrix.python-version == '3.11'
44+ if : ${{ github.event.pull_request.head.repo.full_name == github.repository }}
3445 uses : codecov/codecov-action@v4
3546 with :
3647 token : ${{ secrets.CODECOV_TOKEN }}
3748 files : ./coverage.xml
3849 flags : unittests
3950 fail_ci_if_error : true
51+ verbose : true
0 commit comments