File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Unit Tests
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+ - ' release/**'
9+ - develop
10+ paths :
11+ - ' !docs/**'
12+
13+ pull_request :
14+
15+ # Cancel in progress workflows on pull_requests.
16+ # https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
17+ concurrency :
18+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
19+ cancel-in-progress : true
20+
21+ permissions :
22+ contents : read
23+
24+ jobs :
25+ test :
26+ name : ${{ matrix.tests-type }}, python ${{ matrix.python-version }}
27+ runs-on : ubuntu-latest
28+ timeout-minutes : 45
29+
30+ strategy :
31+ fail-fast : false
32+ matrix :
33+ python-version : ["3.7","3.8","3.9","3.10"]
34+ tests-type : ["DefaultSetup"]
35+
36+ steps :
37+ - uses : actions/checkout@v3
38+ # - uses: actions/cache@v3
39+ # with:
40+ # path: ~/.cache/pip
41+ # key: ${{ runner.os }}-pip-${{ hashFiles('**/test-requirements.txt') }}
42+ # restore-keys: |
43+ # ${{ runner.os }}-pip-
44+ - uses : actions/setup-python@v4
45+ with :
46+ python-version : ${{ matrix.python-version }}
47+
48+ - name : " Setup test env"
49+ run : |
50+ pip install coverage pytest-codecov tox==4.2.8
51+
52+ - name : " Run unit tests"
53+ timeout-minutes : 45
54+ shell : bash
55+ run : |
56+ set -x # print commands that are executed
57+ # coverage erase
58+ # ./scripts/runtox.sh "${{ matrix.python-version }}-${{ matrix.tests-type }}" --cov --cov-report=
59+ # coverage combine .coverage-*
60+ # coverage html -i
61+
62+ # Uploading test artifacts
63+ # https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts#uploading-build-and-test-artifacts
64+ # - name: "Upload artifact"
65+ # uses: actions/upload-artifact@v3
66+ # with:
67+ # name: code-coverage-report
68+ # path: htmlcov/
69+ # retention-days: 10
You can’t perform that action at this time.
0 commit comments