-
Notifications
You must be signed in to change notification settings - Fork 87
73 lines (66 loc) · 2.17 KB
/
cypress-demo-all-flags.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
name: Run e2e (default demo with all feature flags enabled)
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
paths:
- 'demos/default/**/*.{js,jsx,ts,tsx}'
- 'cypress/e2e/default/**/*.{ts,js}'
- 'packages/*/src/**/*.{ts,js}'
jobs:
cypress:
name: Cypress
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate Github token
uses: navikt/github-app-token-generator@v1
id: get-token
with:
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
app-id: ${{ secrets.TOKENS_APP_ID }}
- name: Checkout @netlify/wait-for-deploy-action
uses: actions/checkout@v3
with:
repository: netlify/wait-for-deploy-action
token: ${{ steps.get-token.outputs.token }}
path: ./.github/actions/wait-for-netlify-deploy
- name: Wait for Netlify Deploy
id: deploy
uses: ./.github/actions/wait-for-netlify-deploy
with:
site-name: netlify-plugin-nextjs-demo-all-flags
timeout: 300
- name: Deploy successful
if: ${{ steps.deploy.outputs.origin-url }}
run: echo ${{ steps.deploy.outputs.origin-url }}
- name: Node
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- name: Cypress run
if: ${{ steps.deploy.outputs.origin-url }}
id: cypress
uses: cypress-io/github-action@v5
with:
browser: chrome
record: true
parallel: true
config-file: cypress/config/ci.config.ts
group: 'Next Runtime - Demo'
spec: cypress/e2e/default/*
env:
DEBUG: '@cypress/github-action'
CYPRESS_baseUrl: ${{ steps.deploy.outputs.origin-url }}
CYPRESS_NETLIFY_CONTEXT: ${{ steps.deploy.outputs.context }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.DEFAULT_CYPRESS_RECORD_KEY }}
CYPRESS_PLUGIN_ALL_FEATURE_FLAGS: 'enabled'