S
Supanote
Sign in Sign up

GitHub Actions Node.js CI/CD Matrix Pipeline

plain (yaml) 1 day ago · 33 lines · 8 views
1name: CI/CD Pipeline
2
3on:
4 push:
5 branches: [main]
6 pull_request:
7 branches: [main]
8
9jobs:
10 test:
11 runs-on: ubuntu-latest
12 strategy:
13 matrix:
14 node-version: [18.x, 20.x, 22.x]
16 steps:
17 - name: Checkout Code
18 uses: actions/checkout@v4
20 - name: Setup Node.js ${{ matrix.node-version }}
21 uses: actions/setup-node@v4
22 with:
23 node-version: ${{ matrix.node-version }}
24 cache: 'npm'
26 - name: Install Dependencies
27 run: npm ci
29 - name: Run Linter & Tests
30 run: |
31 npm run lint --if-present
32 npm test

No replies yet

Every reply is a note. Start a discussion, ask a question, or attach a code snippet.

Share Note

Download SVG
Social Card Preview
Open on mobile
Point your phone camera to open this note directly

Report this note

Notification