-
Notifications
You must be signed in to change notification settings - Fork 259
108 lines (90 loc) · 2.74 KB
/
integration.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Integration Tests
on:
merge_group:
workflow_dispatch:
pull_request:
branches:
- master
push:
branches:
- master
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
env:
NODE_ENV: development
NODE_VERSION: 18
DOMAIN: your-tenant.auth0.com
AUDIENCE: https://api.example.com/users
PORT: 3001
CYPRESS_USER_EMAIL: [email protected]
CYPRESS_USER_PASSWORD: mockpassword
jobs:
test-cra:
name: cra-react-router
runs-on: ubuntu-latest
env:
SKIP_PREFLIGHT_CHECK: true
REACT_APP_DOMAIN: your-tenant.auth0.com
REACT_APP_CLIENT_ID: yourclientid
REACT_APP_AUDIENCE: https://api.example.com/users
REACT_APP_API_PORT: 3001
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare environment
uses: ./.github/actions/integration
with:
integration: 'cra-react-router'
node: ${{ env.NODE_VERSION }}
- name: Start mock API server
run: npm start --prefix=examples/users-api &
- name: Run Cypress integration test
uses: cypress-io/github-action@v6
with:
spec: cypress/integration/smoke.test.ts
# install: false
build: npm run build
start: npm start --prefix=examples/cra-react-router
wait-on: 'http://127.0.0.1:3001/, http://127.0.0.1:3000'
# test-gatsby:
# name: Run Gatsby tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Prepare integration test
# uses: ./.github/actions/integration
# with:
# integration: 'gatsby-app'
# node: ${{ env.NODE_VERSION }}
# dotenv: .env.development.sample
# - name: Run integration tests
# run: |
# npm run test:gatsby
# env:
# GATSBY_DOMAIN: your-tenant.auth0.com
# GATSBY_CLIENT_ID: yourclientid
# GATSBY_AUDIENCE: https://api.example.com/users
# GATSBY_API_PORT: 3001
# test-nextjs:
# name: Run NextJS tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Prepare integration test
# uses: ./.github/actions/integration
# with:
# integration: 'nextjs-app'
# node: ${{ env.NODE_VERSION }}
# - name: Run integration tests
# run: |
# npm run test:nextjs
# env:
# NEXT_PUBLIC_DOMAIN: your-tenant.auth0.com
# NEXT_PUBLIC_CLIENT_ID: yourclientid
# NEXT_PUBLIC_AUDIENCE: https://api.example.com/users
# NEXT_PUBLIC_API_PORT: 3001