build(deps): bump github/codeql-action from 2.21.3 to 2.21.4 (#399) #904
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: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- ubuntu-latest # Don't use this in production! | |
python: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: actions/[email protected] | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}-${{ hashFiles('./poetry.lock') }} | |
restore-keys: ${{ matrix.os }}-pip-${{ secrets.CACHE_SEED }}-${{ matrix.python }}- | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install Poetry | |
run: python -m pip install poetry | |
- name: Install Python dependencies | |
run: python -m poetry install | |
- name: Lint Last Commit | |
if: github.event_name == 'push' | |
run: poetry run gitlint | |
- name: Lint All Commits on Pull Request | |
if: github.event_name == 'pull_request' | |
run: poetry run gitlint --commits "origin/${{ github.base_ref }}...HEAD" | |
- name: Format | |
run: poetry run pre-commit run --all-files | |
- name: Test | |
run: poetry run coverage run --module pytest | |
- name: Verify test coverage | |
run: poetry run coverage html | |
- name: Archive code coverage report | |
uses: actions/[email protected] | |
with: | |
name: code-coverage-report | |
path: htmlcov | |
if: ${{ failure() }} | |
finalise: | |
if: always() | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/[email protected] | |
with: | |
jobs: ${{ toJSON(needs) }} |