-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.21 KB
/
ci.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
47
48
49
50
51
52
53
54
55
# This workflow will do a clean install of node dependencies, build the source
# code and run lints and tests.
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: CI
strategy:
matrix:
node:
- '20'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- name: Setup Node.js
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3
with:
node-version: ${{ matrix.node }}
- name: Setup pnpm
run: |-
corepack enable
pnpm --version
- name: Set pnpm store-dir
run: pnpm config set store-dir ~/.pnpm-store
- name: Cache pnpm modules
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3
with:
path: ~/.pnpm-store
key: ${{ runner.OS }}-pnpm-current-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.OS }}-pnpm-current
- name: Install packages
run: pnpm install
- name: Build
run: pnpm run build
- name: Run linter
run: pnpm run lint