chore(gha): add linear.yml GitHub workflow #1
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: Run code checks | |
on: | |
push: | |
branches: [main] | |
tags: | |
pull_request: | |
branches: | |
- main | |
- 'releases/**' | |
jobs: | |
code-checks: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install tools | |
run: pip install -r dev-requirements.txt | |
- name: Poetry install | |
run: poetry install | |
- name: Run code quality tools | |
run: poetry run pre-commit run --all-files | |
- name: Run unit tests | |
run: poetry run coverage run -m pytest tests/ | |
- name: Check unit test coverage | |
run: poetry run coverage report |