-
Notifications
You must be signed in to change notification settings - Fork 20
55 lines (42 loc) · 1.16 KB
/
test-and-build.yml
File metadata and controls
55 lines (42 loc) · 1.16 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
53
54
55
name: Test & Build
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "12 16 * * *"
jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Install zero canary (cron only)
if: github.event_name == 'schedule'
run: pnpm install @rocicorp/zero@canary -w
- name: Build
run: pnpm run build
- name: Type check tests
run: pnpm run test:types
- name: Run tests
run: pnpm test
- name: Run integration tests (PG 16)
run: cd integration && PG_VERSION=16 pnpm test
- name: Run integration tests (PG 17)
run: cd integration && PG_VERSION=17 pnpm test