Split out linting. #1010
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: Python | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Set Poetry config | |
run: | | |
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }} | |
- name: Install dependencies | |
run: poetry install | |
- name: ruff check | |
run: poetry run ruff check . | |
- name: mypy check | |
run: poetry run mypy django_unicorn | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "poetry" | |
- name: Install Poetry | |
run: pipx install poetry | |
- name: Set Poetry config | |
run: | | |
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }} | |
- name: Install dependencies | |
run: poetry install -E minify | |
- name: Run all tests | |
run: poetry run nox |