-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (54 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
66 lines (54 loc) · 1.57 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
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: ci
POSTGRES_PASSWORD: ci
POSTGRES_DB: ci
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://ci:ci@localhost:5432/ci
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Prisma migrate deploy
run: pnpm --filter api exec prisma migrate deploy
- name: Test
env:
RUN_DB_INTEGRATION_TESTS: "true"
run: pnpm test
- name: Build
run: pnpm -r run build
- name: Verify committed telemetry-core dist matches build
run: |
git add -A packages/telemetry-core/dist packages/telemetry-next/dist
git diff --cached --exit-code -- packages/telemetry-core/dist packages/telemetry-next/dist
git diff --exit-code -- packages/telemetry-core/dist packages/telemetry-next/dist