From cf0706c844beca731df3527bdde955d7e99805de Mon Sep 17 00:00:00 2001 From: "Guido A.J. Stevens" Date: Fri, 25 Oct 2024 10:45:54 +0200 Subject: [PATCH] try to split jobs --- .github/workflows/plone-package.yml | 45 ++++++++++++++++++++--------- tox.ini | 3 +- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/.github/workflows/plone-package.yml b/.github/workflows/plone-package.yml index 5014d7e..80164bf 100644 --- a/.github/workflows/plone-package.yml +++ b/.github/workflows/plone-package.yml @@ -10,7 +10,36 @@ on: branches: [main] jobs: - build: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + action-version: 'lint' + steps: + - name: Git checkout + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions + + - name: Black-Check + run: | + tox -r -e black-check + + - name: Lint with tox + run: | + tox -r + + build_and_test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -66,22 +95,10 @@ jobs: python -m pip install --upgrade pip pip install tox tox-gh-actions - - name: Black-Check - run: | - tox -r -e black-check - - - name: Lint with tox - run: | - tox -r - env: - MATCH_ACTION_ENV: lint - PYTHON_VERSION: ${{ matrix.plone-version }} - - name: Test with tox run: | tox -r env: - MATCH_ACTION_ENV: ${{ matrix.plone-version }} - PYTHON_VERSION: ${{ matrix.plone-version }} + PLONE_VERSION: ${{ matrix.plone-version }} # To add coverage, see https://hynek.me/articles/ditch-codecov-python/ diff --git a/tox.ini b/tox.ini index 80731ba..cc5e74e 100644 --- a/tox.ini +++ b/tox.ini @@ -23,8 +23,7 @@ python = [gh-actions:env] -MATCH_ACTION_ENV = - lint: lint +PLONE_VERSION = Plone52: Plone52 Plone60: Plone60