-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.04 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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: corepack enable pnpm
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
test:
name: Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: corepack enable pnpm
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm run test
check-lockfiles:
name: Check Lockfiles
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- run: if [ -f package-lock.json ]; then echo "'package-lock.json' exists. Please use 'pnpm' instead of 'npm'."; exit 1; fi
- run: if [ -f yarn.lock ]; then echo "'yarn.lock' exists. Please use 'pnpm' instead of 'yarn'."; exit 1; fi