-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.47 KB
/
test.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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
fauna:
image: fauna/faunadb
ports:
- 8443:8443
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
- run: npm ci
- run: cp .env.template .env
- run: cat .env >> $GITHUB_ENV
- run: npm run --silent db:init > .db-init.log
- run: cat .db-init.log | jq '.[4].secret' | awk '{print "FAUNADB_INVITEE_SECRET="$1}' >> .env
- run: cat .db-init.log | jq '.[6].secret' | awk '{print "FAUNADB_HOST_MANAGER_SECRET="$1}' >> .env
- run: npx web-push generate-vapid-keys --json | jq '.publicKey' | awk '{print "VAPID_PUBLIC_KEY="$1}' >> .env
- run: npx web-push generate-vapid-keys --json | jq '.privateKey' | awk '{print "VAPID_PRIVATE_KEY="$1}' >> .env
- run: cat .env
- run: npm run unit
- uses: cypress-io/github-action@v5.8.4
with:
build: npm run build
start: npm run preview
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore