-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from itayB/itayB-patch-1
ci(tests): adding coverage report action
- Loading branch information
Showing
1 changed file
with
19 additions
and
8 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 |
---|---|---|
@@ -1,20 +1,31 @@ | ||
name: Test, Lint | ||
# This workflow will install Python dependencies, run tests check the coverage | ||
|
||
on: [push] | ||
name: Test with coverage | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.8 | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt -r requirements-dev.txt | ||
- name: Run tests | ||
run: make test | ||
- name: Run Linters | ||
run: make lint | ||
- name: Test with pytest | ||
run: py.test -o junit_family=xunit2 --junitxml result.xml -v --ff --cov=serversion --cov-report=xml --cov-report=term tests | ||
- name: Coverage Report | ||
if: always() | ||
uses: aGallea/tests-coverage-report@1.3.1 | ||
with: | ||
min-coverage-percentage: '100' | ||
fail-under-coverage-percentage: 'true' | ||
cobertura-path: ./coverage.xml | ||
junit-path: ./result.xml |