Repository navigation
87 lines (70 loc) · 1.92 KB
/
Copy pathci.yaml
File metadata and controls
87 lines (70 loc) · 1.92 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
check:
name: Typecheck, Handbook, E2E-check, Test (100% coverage), Postgres, Build, E2E
runs-on: ubuntu-latest
timeout-minutes: 15
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: gifts
POSTGRES_PASSWORD: gifts
POSTGRES_DB: gifts
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U gifts -d gifts"
--health-interval 5s
--health-timeout 5s
--health-retries 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Typecheck
run: bun run typecheck
- name: Handbook completeness
run: bun run handbook:check
- name: E2E completeness
run: bun run e2e:check
- name: Test with 100% coverage gate
run: bun run test:coverage
- name: Postgres driver
env:
DATABASE_URL: postgres://gifts:gifts@localhost:5432/gifts
run: bun run test:postgres
- name: Build
run: bun run build
- name: End-to-end HTTP tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
run: bun run e2e