Skip to content

Commit

Permalink
ci: on PRs, build only change packages (#185)
Browse files Browse the repository at this point in the history
* ci: on PRs, build only change packages

* ci: change triggers

* ci: build changed on both PR and push events
  • Loading branch information
tpluscode authored Dec 8, 2023
1 parent 769d175 commit c033f02
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Node.js CI

on:
push:
branches:
- master
pull_request:
branches:
- master
on: [push, pull_request]

jobs:
build:
Expand All @@ -21,14 +15,22 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --prune

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test
- run: npx wsrun -y 10 -lm --report -c prepack
- name: Build all
run: npx wsrun -y 10 -lm --report -c prepack
if: github.ref == 'refs/heads/master'
- name: Build changed
run: npx wsrun --changedSince origin/master -y 10 -lm --report -c prepack
if: github.ref != 'refs/heads/master'

- name: Codecov
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit c033f02

Please sign in to comment.