77 types : [published]
88
99jobs :
10- test-on-master :
10+ test-on-all-push :
1111 name : Test on Master Branch
1212 if : github.event_name == 'push'
1313 runs-on : ubuntu-latest
@@ -31,59 +31,14 @@ jobs:
3131 - name : Install wheel and build tools
3232 run : python -m pip install --upgrade wheel build
3333
34- - name : Install project dependencies
34+ - name : Install PyTorch and dependencies
3535 run : |
36+ pip install --index-url https://download.pytorch.org/whl/cpu torch==2.6.0
3637 pip install -r ci/requirements.txt
3738 pip install .
3839
3940 - name : Run tests
40- run : pytest tests --cov solt --cov-report term-missing -v
41-
42- - name : Check code formatting
43- run : black --config=black.toml --check .
44-
45- - name : Run flake8 linter
46- run : flake8
47-
48- - name : Upload test results to Codecov
49- if : ${{ !cancelled() }}
50- uses : codecov/test-results-action@v1
51- with :
52- token : ${{ secrets.CODECOV_TOKEN }}
53-
54- test-on-release :
55- name : Test on Release Tag
56- if : github.event_name == 'release'
57- runs-on : ubuntu-latest
58- strategy :
59- matrix :
60- python-version : ["3.9", "3.10", "3.11", "3.12"]
61- fail-fast : false
62-
63- steps :
64- - name : Checkout code
65- uses : actions/checkout@v4
66- with :
67- ref : ${{ github.event.release.tag_name }}
68-
69- - name : Set up Python
70- uses : actions/setup-python@v5
71- with :
72- python-version : ${{ matrix.python-version }}
73-
74- - name : Update pip
75- run : python -m pip install --upgrade pip
76-
77- - name : Install wheel and build tools
78- run : python -m pip install --upgrade wheel build
79-
80- - name : Install project dependencies
81- run : |
82- pip install -r ci/requirements.txt
83- pip install .
84-
85- - name : Run tests
86- run : pytest tests --cov solt --cov-report term-missing -v
41+ run : pytest tests --cov solt --cov-report=xml --junitxml=./junit.xml
8742
8843 - name : Check code formatting
8944 run : black --config=black.toml --check .
0 commit comments