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.
This commit is contained in:
Henry Mercer
2024-07-30 18:48:16 +01:00
parent f67c9cd326
commit 38a02917b0

View File

@@ -2,7 +2,6 @@ name: PR Checks
on: on:
push: push:
branches: [main, releases/v*]
pull_request: pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened # Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows. # by other workflows.
@@ -53,6 +52,7 @@ jobs:
run: .github/workflows/script/check-js.sh run: .github/workflows/script/check-js.sh
check-node-modules: 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 name: Check modules up to date
runs-on: macos-latest runs-on: macos-latest
timeout-minutes: 45 timeout-minutes: 45
@@ -63,6 +63,7 @@ jobs:
run: .github/workflows/script/check-node-modules.sh run: .github/workflows/script/check-node-modules.sh
check-file-contents: check-file-contents:
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
name: Check file contents name: Check file contents
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45 timeout-minutes: 45
@@ -87,6 +88,7 @@ jobs:
run: .github/workflows/script/verify-pr-checks.sh run: .github/workflows/script/verify-pr-checks.sh
npm-test: npm-test:
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
name: Unit Test name: Unit Test
needs: [check-js, check-node-modules] needs: [check-js, check-node-modules]
strategy: strategy:
@@ -106,7 +108,7 @@ jobs:
npm test npm test
check-node-version: check-node-version:
if: ${{ github.event.pull_request }} if: github.event.pull_request
name: Check Action Node versions name: Check Action Node versions
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45 timeout-minutes: 45