Skip to content

Instantly share code, notes, and snippets.

@itsMapleLeaf
Created February 28, 2024 17:27
Show Gist options
  • Save itsMapleLeaf/5ef5717301f9815b18303a74c086abb0 to your computer and use it in GitHub Desktop.
Save itsMapleLeaf/5ef5717301f9815b18303a74c086abb0 to your computer and use it in GitHub Desktop.
GitHub Node.js Workflow
name: Checks
on:
push:
branches:
- main
pull_request:
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
script: [lint, typecheck, test]
name: ${{ matrix.script }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run ${{ matrix.script }}
run: pnpm run ${{ matrix.script }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment