From 043e6c335550f30319eb553261dce040b0ef4ff1 Mon Sep 17 00:00:00 2001 From: adamghill Date: Sun, 28 Jul 2024 15:54:32 -0400 Subject: [PATCH] Split out linting. --- .github/workflows/python.yml | 40 +++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 27c2e71d..736c8bea 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -4,26 +4,25 @@ on: workflow_dispatch: jobs: - test: + lint: runs-on: ubuntu-latest strategy: matrix: python-version: [3.8, 3.9, "3.10", "3.11"] steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v3 with: fetch-depth: 1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.1.4 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + cache: "poetry" - name: Install Poetry - uses: abatilo/actions-poetry@v2.1.6 - with: - poetry-version: 1.6.1 + run: pipx install poetry - name: Set Poetry config run: | @@ -35,8 +34,35 @@ jobs: - name: ruff check run: poetry run ruff check . - - name: mypy + - 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