File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run Tests
2+ description : Run unit and doc tests with coverage
3+
4+ inputs :
5+ ignores :
6+ description : ' Space-separated list of test files to ignore'
7+ required : false
8+ default : ' '
9+ dtype :
10+ description : ' Torch dtype to use for tests'
11+ required : false
12+ default : ' float32'
13+ device :
14+ description : ' Torch device to use for tests'
15+ required : false
16+ default : ' cpu'
17+
18+ runs :
19+ using : composite
20+ steps :
21+ - name : Run unit and doc tests with coverage report
22+ shell : bash
23+ env :
24+ PYTEST_TORCH_DTYPE : ${{ inputs.dtype }}
25+ PYTEST_TORCH_DEVICE : ${{ inputs.device }}
26+ run : |
27+ # Build the pytest command
28+ cmd="uv run pytest -W error tests/unit tests/doc"
29+
30+ # Add ignore flags for each file
31+ if [ -n "${{ inputs.ignores }}" ]; then
32+ for file in ${{ inputs.ignores }}; do
33+ cmd="$cmd --ignore $file"
34+ done
35+ fi
36+
37+ # Add coverage options
38+ cmd="$cmd --cov=src --cov-report=xml"
39+
40+ # Execute the command
41+ eval $cmd
Original file line number Diff line number Diff line change 3232 options : full
3333 groups : test
3434
35- - name : Run unit and doc tests with coverage report
36- run : uv run pytest -W error tests/unit tests/doc --cov=src --cov-report=xml
35+ - uses : ./.github/actions/run-tests
3736
3837 - &upload-codecov
3938 name : Upload results to Codecov
5453 with :
5554 groups : test
5655
57- - name : Run unit and doc tests with coverage report
58- run : |
59- uv run pytest -W error tests/unit tests/doc \
60- --ignore tests/unit/aggregation/test_cagrad.py \
61- --ignore tests/unit/aggregation/test_nash_mtl.py \
62- --ignore tests/doc/test_aggregation.py \
63- --cov=src --cov-report=xml
56+ - uses : ./.github/actions/run-tests
57+ with :
58+ ignores : tests/unit/aggregation/test_cagrad.py tests/unit/aggregation/test_nash_mtl.py tests/doc/test_aggregation.py
6459
6560 - *upload-codecov
6661
7873 options : full
7974 groups : test
8075
81- - name : Run unit and doc tests with coverage report
82- run : uv run pytest -W error tests/unit tests/doc --cov=src --cov-report=xml
83- env :
84- PYTEST_TORCH_DTYPE : float64
76+ - uses : ./.github/actions/run-tests
77+ with :
78+ dtype : float64
8579
8680 - *upload-codecov
8781
You can’t perform that action at this time.
0 commit comments