File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run tests and upload coverage
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ test :
9+ name : Run tests and collect coverage
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 2
16+
17+ - name : Set up Python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : ' 3.13'
21+
22+ - name : Install Poetry
23+ uses : snok/install-poetry@v1
24+
25+ - name : Install dependencies
26+ run : poetry install --with dev
27+
28+ - name : Setup Gardenlinux
29+ uses : gardenlinux/python-gardenlinux-lib/.github/actions/setup@main
30+
31+ - name : Prepare environment
32+ run : make install-test
33+
34+ - name : Run tests
35+ run : make test-coverage-ci
36+
37+ - name : Check for report
38+ run : test -f coverage.xml
39+
40+ - name : Upload results to Codecov
41+ uses : codecov/codecov-action@v5
42+ with :
43+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ install-test: install-dev
4646test : install-test
4747 $(POETRY ) run pytest -k " not kms"
4848
49+ test-coverage : install-test
50+ $(POETRY ) run pytest -k " not kms" --cov=gardenlinux --cov-report=xml tests/
51+
52+ test-coverage-ci : install-test
53+ $(POETRY ) run pytest -k " not kms" --cov=gardenlinux --cov-report=xml --cov-fail-under=50 tests/
54+
4955test-debug : install-test
5056 $(POETRY ) run pytest -k " not kms" -vvv -s
5157
You can’t perform that action at this time.
0 commit comments