-
Notifications
You must be signed in to change notification settings - Fork 258
76 lines (61 loc) · 2.07 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
name: Integration Tests
on:
merge_group:
workflow_dispatch:
pull_request_target:
types:
- opened
- synchronize
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
NODE_VERSION: 18
jobs:
authorize:
name: Authorize
environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
test-examples:
needs: authorize # Require approval before running on forked pull requests
name: Run example tests
runs-on: ubuntu-latest
env:
SKIP_PREFLIGHT_CHECK: true
CYPRESS_USER_EMAIL: ${{secrets.CYPRESS_USER_EMAIL}}
CYPRESS_USER_PASSWORD: ${{secrets.CYPRESS_USER_PASSWORD}}
REACT_APP_DOMAIN: ${{secrets.TEST_DOMAIN}}
REACT_APP_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}}
REACT_APP_AUDIENCE: ${{secrets.TEST_AUDIENCE}}
GATSBY_DOMAIN: ${{secrets.TEST_DOMAIN}}
GATSBY_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}}
GATSBY_AUDIENCE: ${{secrets.TEST_AUDIENCE}}
NEXT_PUBLIC_DOMAIN: ${{secrets.TEST_DOMAIN}}
NEXT_PUBLIC_CLIENT_ID: ${{secrets.TEST_CLIENT_ID}}
NEXT_PUBLIC_AUDIENCE: ${{secrets.TEST_AUDIENCE}}
DOMAIN: ${{secrets.TEST_DOMAIN}}
AUDIENCE: ${{secrets.TEST_AUDIENCE}}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Install dependencies
run: npm ci
- name: Build SDK
run: npm run build
- name: Install examples
run: npm run install:examples
- name: Run integration test (CRA)
run: npm run test:cra
- name: Run integration test (NextJS)
run: npm run test:nextjs
- name: Run integration test (Gatsby)
run: npm run test:gatsby