From 0bc25bb3fafb32b1acbea4cfe298a039f1896fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rom=C3=A1n?= Date: Thu, 8 Jan 2026 00:10:33 -0800 Subject: [PATCH] ci: add tox reusable workflow --- .github/workflows/ci.yml | 22 ++++++---------------- .github/workflows/publish.yml | 17 +++-------------- .github/workflows/tox.yml | 23 +++++++++++++++++++++++ 3 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/tox.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 103d5e9..bb7d3a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,11 @@ name: ci on: push: - branches: ['8.1', '8.3'] + branches: + - '8.3' pull_request: - branches: ['8.1', '8.3'] + branches: + - '8.3' jobs: pre-commit: @@ -19,20 +21,8 @@ jobs: path: src checkout-ref: ${{ github.ref }} - tox-package: + tox: if: ${{ github.event_name == 'pull_request' }} - uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v6 + uses: ./.github/workflows/tox.yml with: checkout-ref: ${{ github.ref }} - - tox-stubs: - if: ${{ github.event_name == 'pull_request' }} - uses: coatl-dev/workflows/.github/workflows/tox.yml@v6 - with: - python-versions: | - 3.9 - 3.10 - 3.11 - 3.12 - working-directory: stubs - checkout-ref: ${{ github.ref }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d511bcd..594169b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,24 +5,13 @@ on: types: [published] jobs: - tox-package: - uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v6 + tox: + uses: ./.github/workflows/tox.yml with: checkout-ref: ${{ github.event.release.tag_name }} - tox-stubs: - uses: coatl-dev/workflows/.github/workflows/tox.yml@v6 - with: - python-versions: | - 3.9 - 3.10 - 3.11 - 3.12 - working-directory: stubs - checkout-ref: ${{ github.event.release.tag_name }} - pypi-upload: - needs: [tox-package, tox-stubs] + needs: tox runs-on: ubuntu-latest steps: - name: Checkout repo diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml new file mode 100644 index 0000000..196a313 --- /dev/null +++ b/.github/workflows/tox.yml @@ -0,0 +1,23 @@ +on: + workflow_call: + inputs: + checkout-ref: + required: true + type: string + +jobs: + tox-package: + uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v6 + with: + checkout-ref: ${{ inputs.checkout-ref }} + + tox-stubs: + uses: coatl-dev/workflows/.github/workflows/tox.yml@v6 + with: + python-versions: | + 3.9 + 3.10 + 3.11 + 3.12 + working-directory: stubs + checkout-ref: ${{ inputs.checkout-ref }}