-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (43 loc) · 1.42 KB
/
test.yml
File metadata and controls
52 lines (43 loc) · 1.42 KB
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
47
48
49
50
51
52
name: 🧪 Test
on:
push:
branches:
- main
- beta
pull_request: {}
workflow_dispatch: {}
jobs:
test:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: 📥 Checkout repository
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # main
- name: 🟢 Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # main
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: 🗄 Cache node_modules
id: cache-node_modules
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # main
with:
path: "**/node_modules"
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: 🗄 Cache .eslintcache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # main
with:
path: .eslintcache
key: eslintcache-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: 🔍 Install dependencies
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
npm ci --ignore-scripts --prefer-offline --no-audit
- name: 🧪 Run tests
run: |
npm test
env:
CI: true