-
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.
- Loading branch information
1 parent
1c56334
commit 47ce3ed
Showing
4 changed files
with
25 additions
and
6 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,20 @@ 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 | ||
junitxml-path: test_result/pytest.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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
pytest==7.1.2 | ||
pytest-asyncio==0.21.0 | ||
pytest-mock==3.8.2 | ||
pytest-cov==3.0.0 | ||
coverage==7.2.5 | ||
black==22.3.0 | ||
flake8==4.0.1 | ||
requests-mock==1.10.0 |