File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Expand file tree Collapse file tree 2 files changed +48
-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+
6+ jobs :
7+ test :
8+ name : Run tests and collect coverage
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 2
15+
16+ - name : Set up Python
17+ uses : actions/setup-python@v5
18+ with :
19+ python-version : ' 3.13'
20+
21+ - name : Install Poetry
22+ uses : snok/install-poetry@v1
23+
24+ - name : Install dependencies
25+ run : poetry install --with dev
26+
27+ - name : Setup Gardenlinux
28+ uses : gardenlinux/python-gardenlinux-lib/.github/actions/setup@main
29+
30+ - name : Prepare environment
31+ run : make install-test
32+
33+ - name : Run tests
34+ run : make test-coverage-ci
35+
36+ - name : Check for report
37+ run : test -f coverage.xml
38+
39+ - name : Upload results to Codecov
40+ uses : codecov/codecov-action@v5
41+ with :
42+ 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