From f96b72cf16e84df868fd71a0cd9bacad6a0598de Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Thu, 5 Oct 2023 22:06:49 +0100 Subject: [PATCH] ci: improve deployment environment UX (#2742) * chore: check GitHub action workflows against schema * chore: simplify environment names * ci: use same environments * empty commit * fix: CI schema --- .github/workflows/deploy-cpp.yml | 3 ++- .github/workflows/deploy.yml | 3 ++- .github/workflows/docs.yml | 7 +++---- .github/workflows/test.yml | 2 +- .pre-commit-config.yaml | 6 ++++++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-cpp.yml b/.github/workflows/deploy-cpp.yml index 10fe922a56..97ef290de9 100644 --- a/.github/workflows/deploy-cpp.yml +++ b/.github/workflows/deploy-cpp.yml @@ -169,7 +169,8 @@ jobs: permissions: id-token: write environment: - name: "deploy-cpp-pypi" + name: "pypi" + url: "https://pypi.org/project/awkward-cpp/" steps: - uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 252d6a93fc..e0e381e8cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -105,7 +105,8 @@ jobs: permissions: id-token: write environment: - name: "deploy-pypi" + name: "pypi" + url: "https://pypi.org/project/awkward/" steps: - uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 68b297e2d3..ebca771a20 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -193,7 +193,6 @@ jobs: name: awkward path: dist/awkward*.whl - build-docs: runs-on: ubuntu-22.04 needs: [awkward-cpp-wasm, awkward-cpp-x86-64, awkward] @@ -311,8 +310,8 @@ jobs: S3_BUCKET: "preview.awkward-array.org" DEPLOY_URL: "http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com" environment: - name: docs-preview - url: ${{ env.DEPLOY_URL }}/${{ github.head_ref }} + name: docs + url: "${{ env.DEPLOY_URL }}/${{ github.head_ref }}" steps: - uses: actions/checkout@v4 - name: Configure AWS credentials @@ -343,7 +342,7 @@ jobs: PRODUCTION_URL: "http://awkward-array.org" CLOUDFRONT_ID: "EFM4QVENUIXHS" environment: - name: docs-prod + name: docs url: ${{ env.PRODUCTION_URL }}${{ steps.sync-main.outputs.path || steps.sync-stable.outputs.path }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99f0442084..6f8fc0f3c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -120,7 +120,7 @@ jobs: - '3.9' - '3.8' - runs-on: macOS-11 + runs-on: macos-11 env: PIP_ONLY_BINARY: cmake,numpy diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41a170203d..0b46bcdfb9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -77,3 +77,9 @@ repos: rev: v3.13.0 hooks: - id: pyupgrade + +- repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.27.0 + hooks: + - id: check-github-workflows + args: ["--verbose"]