Repository navigation
95 lines (78 loc) · 1.94 KB
/
Copy pathcode-check.yml
File metadata and controls
95 lines (78 loc) · 1.94 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
88
89
90
91
92
93
94
95
name: Code check
on:
pull_request:
branches: ["*"]
push:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
FORCE_COLOR: 3
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup
- name: Check formatting
run: pnpm format:check
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup
- run: pnpm lint
typecheck:
runs-on: ubuntu-latest
name: Typecheck
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup
- run: pnpm typecheck
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup
- run: pnpm test
e2e:
runs-on: ubuntu-latest
name: E2E
timeout-minutes: 20
services:
postgres:
image: postgres:17.4
env:
POSTGRES_USER: tablecn
POSTGRES_PASSWORD: securepassword
POSTGRES_DB: tablecn
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U tablecn -d tablecn"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://tablecn:securepassword@localhost:5432/tablecn
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: ./.github/setup
- name: Create the database
run: pnpm exec drizzle-kit push --force
- name: Seed
run: pnpm exec tsx src/db/seed.ts
- name: Install Playwright
run: pnpm exec playwright install --with-deps chromium
- name: Build
run: pnpm exec next build
- name: Test
run: pnpm test:e2e