Provide docs and tools for an opinionated development workflow #137
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: test_and_lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-and-lint: | |
name: Run linters and tests ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# If you change this list, also add the new job name to the required | |
# status checks on the protection rule for the main branch. | |
# The job might only show up after it was merged into main. | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install hatch | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install hatch | |
- name: Run linters and tests | |
run: | | |
hatch run linters | |
hatch run tests |