From 38a02917b0256a9f4384a98b5f4954e3cebc8325 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 30 Jul 2024 18:48:16 +0100 Subject: [PATCH] Check compiled code on each push A common mistake is forgetting to compile the code. Ideally, this wouldn't be necessary, but in the meantime, this change gives a visible indication on the commit when the code hasn't been recompiled. --- .github/workflows/pr-checks.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index 946adfa64a..f83aeeba93 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -2,7 +2,6 @@ name: PR Checks on: push: - branches: [main, releases/v*] pull_request: # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # by other workflows. @@ -53,6 +52,7 @@ jobs: run: .github/workflows/script/check-js.sh check-node-modules: + if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v') name: Check modules up to date runs-on: macos-latest timeout-minutes: 45 @@ -63,6 +63,7 @@ jobs: run: .github/workflows/script/check-node-modules.sh check-file-contents: + if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v') name: Check file contents runs-on: ubuntu-latest timeout-minutes: 45 @@ -87,6 +88,7 @@ jobs: run: .github/workflows/script/verify-pr-checks.sh npm-test: + if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v') name: Unit Test needs: [check-js, check-node-modules] strategy: @@ -106,7 +108,7 @@ jobs: npm test check-node-version: - if: ${{ github.event.pull_request }} + if: github.event.pull_request name: Check Action Node versions runs-on: ubuntu-latest timeout-minutes: 45