Rework actions for faster PR CI #877
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI build | |
on: | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 100 # will work until someone has 100 commits stacked up in a single PR | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
cache: "pnpm" | |
node-version: ${{ matrix.node-version }} | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm lerna run build --since $GITHUB_BASE_REF | |
- run: git diff --exit-code | |
- run: pnpm lerna run lint --since $GITHUB_BASE_REF | |
- run: pnpm lerna run test --since $GITHUB_BASE_REF | |
# note: does not run last-checks |