Bump coverage from 7.2.7 to 7.3.0 #221
Workflow file for this run
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: | |
push: | |
branches: | |
- dev | |
pull_request: | |
jobs: | |
lint: | |
name: Static analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.3.2" | |
- name: Install dependencies | |
run: poetry install | |
- name: Test formatting | |
run: poetry run black --check . | |
- name: Test sorting | |
run: poetry run isort --check . | |
- name: Test docstring formatting | |
run: poetry run docformatter --check --recursive --wrap-summaries=119 --wrap-descriptions=119 . | |
- name: Static code analysis | |
run: poetry run mypy . | |
- name: Run pylint | |
run: poetry run pylint quantuminspire | |
unit-test: | |
name: Unit testing | |
needs: lint | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
runs-on: ${{ matrix.os }} | |
env: | |
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.3.2" | |
- name: Install dependencies | |
run: poetry install | |
- name: Test with pytest | |
run: poetry run pytest . | |
complete: | |
# see https://github.community/t/status-check-for-a-matrix-jobs/127354/7 | |
name: Report status | |
needs: [lint, unit-test] | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check all job status | |
# see https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#needs-context | |
# see https://stackoverflow.com/a/67532120/4907315 | |
if: >- | |
${{ | |
contains(needs.*.result, 'failure') | |
|| contains(needs.*.result, 'cancelled') | |
|| contains(needs.*.result, 'skipped') | |
}} | |
run: exit 1 |