Add coveralls to github actions
@@ -16,18 +16,48 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
+
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
+ sudo apt-get install xvfb
+ pip install coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+
+ # code quality check (linting)
- 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
+
+ # tests suite & creates coverage report
- name: Test with nose
run: |
- sudo apt-get install xvfb
- nosetests skrf --nocapture -c nose.cfg
+ nosetests skrf --nocapture --with-coverage -c nose.cfg
+ #coverage run -m nose skrf --nocapture --with-coverage -c nose.cfg
+
+ # Upload coverage data to coveralls.io
+ - name: Upload coverage data to coveralls.io
+ env:
+ COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
+ COVERALLS_PARALLEL: true
+ run: |
+ pip install coveralls
+ coveralls --service=gihtub
+
+ coveralls:
+ name: Indicate completion to coveralls.io (Finish)
+ needs: Tests
+ runs-on: ubuntu-latest
+ container: python:3-slim
+ steps:
+ - name: Finished
+ run: |
+ pip3 install --upgrade coveralls
+ coveralls --finish
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
