Skip to content

Commit

Permalink
Check compiled code on each push
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
henrymercer committed Jul 30, 2024
1 parent f67c9cd commit 38a0291
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 38a0291

Please sign in to comment.