-
Notifications
You must be signed in to change notification settings - Fork 311
58 lines (46 loc) · 1.07 KB
/
test.yml
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
53
54
55
56
57
58
name: Build and Test
on:
merge_group:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18.17', '20.3']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
shell: bash
run: npm ci --include=dev
- name: ESLint
shell: bash
run: npm run lint
- name: Build
shell: bash
run: npm run build
- name: Lint package
shell: bash
run: npm run lint:package
- name: Tests
shell: bash
run: npm run test:ci