-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.28 KB
/
main.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
name: QA
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.19.1
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Check linters
run: pnpm lint
- name: Validate paths
run: |
pnpm paths
git diff --exit-code ./lib/\$path.ts
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.19.1
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "pnpm"
- uses: actions/cache@v2
with:
path: |
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.json') }}-
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm build