Skip to content

Commit

Permalink
[ADD] Coverage (#6)
Browse files Browse the repository at this point in the history
* [ADD] Coverage

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml

* Update python-test.yml
  • Loading branch information
mileo authored Mar 1, 2021
1 parent a2f764d commit b409976
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ jobs:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Generate coverage report
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install flake8
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
directory: ./coverage/reports/
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.txt
verbose: true

0 comments on commit b409976

Please sign in to comment.