Skip to content

Commit 159c618

Browse files
authored
Merge pull request #2398 from github/henrymercer/compile-check-on-push
Check compiled code on each push
2 parents 16639b4 + 38a0291 commit 159c618

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/pr-checks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: PR Checks
22

33
on:
44
push:
5-
branches: [main, releases/v*]
65
pull_request:
76
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
87
# by other workflows.
@@ -53,6 +52,7 @@ jobs:
5352
run: .github/workflows/script/check-js.sh
5453

5554
check-node-modules:
55+
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
5656
name: Check modules up to date
5757
runs-on: macos-latest
5858
timeout-minutes: 45
@@ -63,6 +63,7 @@ jobs:
6363
run: .github/workflows/script/check-node-modules.sh
6464

6565
check-file-contents:
66+
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
6667
name: Check file contents
6768
runs-on: ubuntu-latest
6869
timeout-minutes: 45
@@ -87,6 +88,7 @@ jobs:
8788
run: .github/workflows/script/verify-pr-checks.sh
8889

8990
npm-test:
91+
if: github.event_name != 'push' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases/v')
9092
name: Unit Test
9193
needs: [check-js, check-node-modules]
9294
strategy:
@@ -106,7 +108,7 @@ jobs:
106108
npm test
107109
108110
check-node-version:
109-
if: ${{ github.event.pull_request }}
111+
if: github.event.pull_request
110112
name: Check Action Node versions
111113
runs-on: ubuntu-latest
112114
timeout-minutes: 45

0 commit comments

Comments
 (0)