File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main, develop ]
8+
9+ jobs :
10+ test :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ os : [ubuntu-latest, windows-latest, macos-latest]
15+ python-version : ["3.10", "3.11", "3.12", "3.13"]
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Python ${{ matrix.python-version }}
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ${{ matrix.python-version }}
24+ cache : ' pip'
25+
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install -e ".[dev]"
30+
31+ - name : Run tests with pytest
32+ run : |
33+ pytest tests/ --doctest-modules --junitxml=junit/test-results.xml --cov=src/utcp --cov-report=xml --cov-report=html
34+
35+ - name : Upload coverage reports to Codecov
36+ uses : codecov/codecov-action@v3
37+ if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
38+ with :
39+ file : ./coverage.xml
40+ fail_ci_if_error : false
41+
42+ - name : Upload test results
43+ uses : actions/upload-artifact@v4
44+ if : always()
45+ with :
46+ name : test-results-${{ matrix.os }}-${{ matrix.python-version }}
47+ path : |
48+ junit/
49+ htmlcov/
50+ coverage.xml
You can’t perform that action at this time.
0 commit comments