-
Notifications
You must be signed in to change notification settings - Fork 231
79 lines (62 loc) · 1.81 KB
/
Copy pathci.yml
File metadata and controls
79 lines (62 loc) · 1.81 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
name: CI
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "24.18.0"
NEXT_TELEMETRY_DISABLED: 1
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/fulling_test
BETTER_AUTH_URL: http://127.0.0.1:3000
BETTER_AUTH_SECRET: ci-better-auth-secret-at-least-32-characters
GITHUB_CLIENT_ID: test-github-client-id
GITHUB_CLIENT_SECRET: test-github-client-secret
jobs:
lint-test-build:
name: Lint, Test, Build
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: fulling_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d fulling_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Audit production dependencies
run: npm run audit:prod
- name: Audit all dependencies
run: npm run audit
- name: Deploy database baseline
run: npm run prisma:migrate
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Install Playwright Chromium
run: npm exec -- playwright install --with-deps chromium
- name: Run browser tests
run: npm run test:e2e
- name: Build project
run: npm run build