Update test workflow config #47
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
name: tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- development | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e.[dev,all] | |
- name: Run tests with pytest | |
run: coverage run -m pytest --html=test-report.html | |
- name: Run coverage | |
run: | | |
coverage report | |
coverage html | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v2 | |
if: ${{ always() }} | |
with: | |
name: code-coverage-report | |
path: coverage_report | |
- name: Archive test report | |
uses: actions/upload-artifact@v2 | |
if: ${{ always() }} | |
with: | |
name: test-report | |
path: | | |
test-report.html | |
assets |