-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (41 loc) · 925 Bytes
/
test.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: 🧪 Test code
# Run this on every push except master and next
on:
push:
branches:
- '**'
- '!master'
- '!next'
permissions:
contents: read
jobs:
publish:
# Use the latest version of Ubuntu
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
# Checkout repository
- name: 📥 Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
# Setup Node
- name: 📦 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "npm"
# Install dependencies
- name: 📦 Install dependencies
run: |
npm ci
# Lint code
- name: 🧹 Lint code
run: npm run lint
# Run tests
- name: 🧪 Run tests
run: npm test