Skip to content

Commit

Permalink
Only run Node 14 tests on merge commits of pull requests
Browse files Browse the repository at this point in the history
The "pull_request" workflow acts more as a "sanity check"
that the PR branch is sufficiently up-to-date with the base branch.

We leave the real heavy lifting over to the "push" workflow.
  • Loading branch information
MattiasBuelens committed Sep 28, 2021
1 parent e14f458 commit ddcab4a
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12, 14]
node-version: [14]
# Run only on non-merged non-draft mergeable pull requests
if: |
!(
Expand All @@ -32,33 +32,3 @@ jobs:
- run: npm run test:unit
- run: npm run test:wpt:node
- run: npm run test:bundler

test-browser:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox]
if: |
!(
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'synchronize')
&& !github.event.pull_request.draft
&& !github.event.pull_request.merged
&& github.event.pull_request.merge_commit_sha != null
)
steps:
- name: Check out merge commit of pull request
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
submodules: true
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx playwright install --with-deps ${{ matrix.browser }}
- run: npm run test:wpt:${{ matrix.browser }}

0 comments on commit ddcab4a

Please sign in to comment.