-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (65 loc) · 1.93 KB
/
e2e.yml
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
name: E2E Tests
on:
pull_request:
branches: ["*"]
push:
branches: ["main"]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
POSTGRES_PRISMA_URL: postgresql://postgres:postgres@localhost:5432/test_db
POSTGRES_URL_NON_POOLING: postgresql://postgres:postgres@localhost:5432/test_db
NEXT_PUBLIC_BASE_URL: http://localhost:3000
NEXTAUTH_SECRET: "test-secret"
GOOGLE_CLIENT_ID: "test-client-id"
GOOGLE_CLIENT_SECRET: "test-client-secret"
CLOUDINARY_KEY: "test-key"
CLOUDINARY_SECRET: "test-secret"
jobs:
e2e:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Install Playwright Browsers
run: pnpm dlx playwright install --with-deps
- name: Generate Prisma Client
run: pnpm db:generate
- name: Run database migrations
run: pnpm -F db db:migrate:deploy
# - name: Seed database
# run: pnpm db:seed
- name: Run E2E tests
run: pnpm e2e:run
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30