File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test using pytest
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ test :
7+ runs-on : ubuntu-22.04
8+
9+ steps :
10+ - name : Checkout repository
11+ uses : actions/checkout@v2
12+
13+ - name : Set up Python
14+
15+ uses : actions/setup-python@v2
16+ with :
17+ # until saxonche is available in 3.13
18+ # https://saxonica.plan.io/issues/6561
19+ python-version : " <3.13"
20+ - name : Display Python version
21+ run : python -c "import sys; print(sys.version)"
22+
23+ - name : Install dependencies
24+ run : |
25+ python -m venv venv
26+ source venv/bin/activate
27+ pip install --upgrade pip setuptools wheel
28+ pip install .[h5py,netcdf,test]
29+
30+ - name : Run tests
31+ run : |
32+ source venv/bin/activate
33+ python -m pytest -n=auto --cov=imas --cov-report=term-missing --cov-report=xml:coverage.xml --cov-report=html:htmlcov --junit-xml=junit.xml
34+
35+ - name : Upload coverage report
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : coverage-report
39+ path : htmlcov
40+
41+ - name : Upload test report
42+ uses : actions/upload-artifact@v4
43+ with :
44+ name : test-report
45+ path : junit.xml
46+
47+ - name : Pytest coverage comment
48+ uses : MishaKav/pytest-coverage-comment@main
49+ with :
50+ pytest-xml-coverage-path : ./coverage.xml
51+ junitxml-path : ./junit.xml
52+ xml-skip-covered : true
53+ hide-report : true
You can’t perform that action at this time.
0 commit comments