forked from aws-amplify/amplify-js
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (73 loc) · 3.2 KB
/
callable-e2e-tests.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
name: E2E Tests
on: workflow_call
jobs:
e2e-prep:
name: Get required configs to run e2e tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: amplify-js
- name: Read integ config files
id: load_config
run: |
echo "INTEG_CONFIG=$(cat .github/integ-config/integ-all.yml | yq '.tests' -o=json | jq -c .)" >> $GITHUB_OUTPUT
echo "INTEG_CONFIG_HEADLESS=$(cat .github/integ-config/integ-all-headless.yml | yq '.tests' -o=json | jq -c .)" >> $GITHUB_OUTPUT
echo "DETOX_INTEG_CONFIG=$(cat .github/integ-config/detox-integ-all.yml | yq -o=json | jq -c .)" >> $GITHUB_OUTPUT
working-directory: ./amplify-js
outputs:
integ-config: ${{ steps.load_config.outputs.INTEG_CONFIG }}
integ-config-headless: ${{ steps.load_config.outputs.INTEG_CONFIG_HEADLESS }}
detox-integ-config: ${{ steps.load_config.outputs.DETOX_INTEG_CONFIG }}
e2e-test-runner:
name: E2E test runnner
needs: e2e-prep
secrets: inherit
strategy:
matrix:
integ-config: ${{ fromJson(needs.e2e-prep.outputs.integ-config) }}
fail-fast: false
uses: ./.github/workflows/callable-e2e-test.yml
with:
test_name: ${{ matrix.integ-config.test_name }}
framework: ${{ matrix.integ-config.framework }}
category: ${{ matrix.integ-config.category }}
spec: ${{ matrix.integ-config.spec || '' }}
amplifyjs_dir: ${{ matrix.integ-config.amplifyjs_dir || false }}
sample_name: ${{ toJSON(matrix.integ-config.sample_name) || '[""]' }}
browser: ${{ toJSON(matrix.integ-config.browser) || '[""]' }}
backend: ${{ matrix.integ-config.backend }}
timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 35 }}
retry_count: ${{ matrix.integ-config.retry_count || 3 }}
yarn_script: ${{ matrix.integ-config.yarn_script || '' }}
env: ${{ matrix.integ-config.env && toJSON(matrix.integ-config.env) || '{}' }}
# e2e-test-runner-headless:
# name: E2E test runnner_headless
# needs: e2e-prep
# secrets: inherit
# strategy:
# matrix:
# integ-config: ${{ fromJson(needs.e2e-prep.outputs.integ-config-headless) }}
# fail-fast: false
# uses: ./.github/workflows/callable-e2e-test-headless.yml
# with:
# test_name: ${{ matrix.integ-config.test_name }}
# category: ${{ matrix.integ-config.category }}
# spec: ${{ matrix.integ-config.spec || '' }}
# timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 35 }}
# retry_count: ${{ matrix.integ-config.retry_count || 3 }}
detox-e2e-test-runner:
name: E2E test runner
needs: e2e-prep
strategy:
matrix:
integ-config: ${{ fromJson(needs.e2e-prep.outputs.detox-integ-config) }}
fail-fast: false
secrets: inherit
uses: ./.github/workflows/callable-e2e-test-detox.yml
with:
test_name: ${{ matrix.integ-config.test_name }}
working_directory: ${{ matrix.integ-config.working_directory }}
timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 45 }}
host_signout_page: ${{ matrix.integ-config.host_signout_page || false }}