This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.77 KB
/
cypress.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
81
82
83
84
85
86
87
88
89
name: Test Branch on Pull Request
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- "**"
env:
CONTACT_CLIENT_EMAIL: ${{secrets.CONTACT_CLIENT_EMAIL}}
CONTACT_SERVICE_CLIENT: ${{secrets.CONTACT_SERVICE_CLIENT}}
CONTACT_PRIVATE_KEY: ${{secrets.CONTACT_PRIVATE_KEY}}
CYPRESS_RECORD_KEY: ${{secrets.CYPRESS_RECORD_KEY}}
CYPRESS_NEXT_AUTH_SESSION_TOKEN: ${{secrets.CYPRESS_NEXT_AUTH_SESSION_TOKEN}}
SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
GOOGLE_ENCRYPTION_IV: ${{secrets.GOOGLE_ENCRYPTION_IV}}
GOOGLE_ENCRYPTION_KEY: ${{secrets.GOOGLE_ENCRYPTION_KEY}}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NEXT_PUBLIC_CONTENTFUL_SPACE_ID: ${{secrets.NEXT_PUBLIC_CONTENTFUL_SPACE_ID}}
NEXT_PUBLIC_CONTENT_PREVIEW_API_KEY: ${{secrets.NEXT_PUBLIC_CONTENT_PREVIEW_API_KEY}}
NEXT_PUBLIC_CONTENT_DELIVERY_API_KEY: ${{secrets.NEXT_PUBLIC_CONTENT_DELIVERY_API_KEY}}
JWT_SIGNING_PRIVATE_KEY: ${{secrets.JWT_SIGNING_PRIVATE_KEY}}
NEXT_PUBLIC_CONTENTFUL_ENVIRONMENT: master
NEXTAUTH_URL: http://localhost:3000
NEXT_PUBLIC_BACKEND_URI: http://localhost:3000/api/graphql
BACKEND_URI: http://localhost:3000/api/graphql
BACKEND_API_KEY: example
SENTRY_ORG: dekk
SENTRY_PROJECT: dekk-homepage
SENTRY_URL: https://sentry.io/
NEXT_PUBLIC_HIDE_COOKIE_CONSENT: true
NEXT_PUBLIC_NO_CACHE: true
jobs:
test:
name: Run Server and Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/cache@v2
id: next-cache
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Create npmrc
run: yarn npmrc:setup
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Install dependencies
run: yarn install
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Build
run: yarn build:dev
- name: Test
run: yarn test