-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: try using coverage directly in action
- Loading branch information
1 parent
33847e7
commit 42f6ae3
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ name: test CI | |
on: [pull_request] | ||
|
||
jobs: | ||
|
||
pytest_with_coverage: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 20 | ||
|
@@ -13,13 +14,19 @@ jobs: | |
run: | | ||
docker-compose -f docker/docker-compose_tests.yml build | ||
- name: Execute pytest with coverage trace under ota-test_base container | ||
# NOTE: test_result folder holds the coverage.xml, check docker-compose_tests.yml for | ||
# coverage execution command line and volumes configurations. | ||
run: | | ||
set -o pipefail | ||
docker-compose -f docker/docker-compose_tests.yml up --no-log-prefix --abort-on-container-exit | tee pytest-coverage.txt | ||
mkdir test_result | ||
docker-compose -f docker/docker-compose_tests.yml up --no-log-prefix --abort-on-container-exit | ||
# export the coverage report to the comment! | ||
- name: Add coverage report to PR comment | ||
continue-on-error: true | ||
uses: MishaKav/[email protected] | ||
uses: MishaKav/[email protected] | ||
with: | ||
- pytest-xml-coverage-path: ./test_result/coverage.xml | ||
|
||
python_lint_check: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters