-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (67 loc) · 1.76 KB
/
Copy pathci.yml
File metadata and controls
83 lines (67 loc) · 1.76 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 24
PNPM_VERSION: 11
jobs:
check:
name: Quality check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install
run: pnpm install
- name: Format and lint
run: pnpm biome ci
- name: Check types
run: pnpm run typecheck
test:
name: Test
runs-on: ubuntu-latest
env:
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
DATABASE_NAME: express_starter_test
DATABASE_MAINTENANCE: postgres
DATABASE_PORT: 5432
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install
run: pnpm install
- name: Start database
run: docker compose up -d --wait db
- name: Test
env:
DATABASE_URL: postgresql://${{ env.DATABASE_USER }}:${{ env.DATABASE_PASSWORD }}@localhost:${{ env.DATABASE_PORT }}/${{ env.DATABASE_NAME }}
run: pnpm test
- name: Cleanup
if: always()
run: docker compose down -v