-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (44 loc) · 1.22 KB
/
Copy pathmain.yml
File metadata and controls
48 lines (44 loc) · 1.22 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
name: E2E-testing
on: [push]
jobs:
e2e:
env:
DATABASE_URL: postgresql://postgres:@localhost:5432/testdb
NODE_ENV: test
NEXTAUTH_SECRET: supersecret
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ["18.x"]
os: [ubuntu-latest]
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_DB: testdb
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
steps:
- name: Checkout repo
uses: actions/checkout@v2
# - name: Install deps and build (with cache)
# uses: bahmutov/npm-install@v1
- run: npm install
- name: Next.js cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-${{ runner.node }}-${{ hashFiles('**/package-lock.json') }}-nextjs
- run: npx playwright install --with-deps
- run: npm run lint
- run: npm run test-start
- run: npm run test-dev
- name: Upload test results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test results
path: |
playwright/test-results