forked from MyZubster-Ecosystem/myzubster
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 698 Bytes
/
Copy pathci.yml
File metadata and controls
31 lines (29 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: CI – Test e Lint
on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout codice
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Installa dipendenze
run: npm ci
- name: Lint
run: npm run lint || echo "Lint non configurato"
- name: Unit test
run: npm test
- name: Build
run: npm run build --if-present