-
Notifications
You must be signed in to change notification settings - Fork 6
123 lines (121 loc) · 4.34 KB
/
daily-e2e.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Daily test
on:
schedule:
# At 04:00 UTC on every day-of-week from Tuesday through Friday.
- cron: '0 04 * * 2-5'
# At 12:00 UTC on Monday.
- cron: '0 12 * * 1'
env:
E2E_USE_NPM_REGISTRY: true
# Platform environment to log into for the e2e tests.
PLATFORM_ENV: 'stg'
# Username used to log into the organization whose ID is stored in the ORG_ID variable
PLATFORM_USER_NAME: ${{ secrets.PLATFORM_USER_NAME }}
# Password used to log into the organization whose ID is stored in the ORG_ID variable
PLATFORM_USER_PASSWORD: ${{ secrets.PLATFORM_USER_PASSWORD }}
# API key to delete all the API keys created by the e2e tests
PLATFORM_API_KEY: ${{ secrets.PLATFORM_API_KEY }}
# ID of the organization to log into for the e2e tests
ORG_ID: ${{ secrets.ORG_ID }}
# Passphrase use to encode/decode cliConfig
E2E_TOKEN_PASSPHRASE: ${{ secrets.E2E_TOKEN_PASSPHRASE }}
jobs:
e2e-setup-login:
name: End-to-end login
runs-on: 'ubuntu-20.04'
timeout-minutes: 30
outputs:
cliConfigJson: ${{ steps.setup.outputs.cliConfigJson}}
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}-dailyg'
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
- name: Checkout last tag
run: git checkout $(git describe --abbrev=0 --tags)
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Install Coveo CLI
run: npm i -g @coveo/cli@latest
- uses: ./.github/actions/e2e-login
id: setup
e2e:
name: End-to-end tests
runs-on: ${{matrix.os}}
needs: [e2e-setup-login]
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'windows-latest']
node: [18]
spec:
[
'angular.specs.ts',
'atomic.specs.ts',
'auth.specs.ci.ts',
'orgList.specs.ts',
'orgResources.specs.ts',
'react.specs.ts',
'vue.specs.ts',
]
exclude:
- os: windows-latest
spec: auth.specs.ci.ts
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: 'id${{ matrix.os }}-${{ github.sha }}-${{ github.run_attempt }}-dailyg'
COVEO_DISABLE_AUTOUPDATE: true
CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
- name: Checkout last tag
run: git checkout $(git describe --abbrev=0 --tags)
- name: Install Coveo CLI
run: npm i -g @coveo/cli@latest
- uses: ./.github/actions/e2e-run
with:
os: ${{ matrix.os }}
node: ${{ matrix.node }}
spec: ${{ matrix.spec }}
cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
e2e-teardown:
name: End-to-end teardown
if: ${{ always() }}
needs: [e2e, e2e-setup-login]
runs-on: ubuntu-20.04
env:
# ID of the test run to identify resources to teardown.
TEST_RUN_ID: '${{ github.sha }}-${{ github.run_attempt }}-dailyg'
CLI_CONFIG_JSON: ${{needs.e2e-setup-login.outputs.cliConfigJson}}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
with:
# pulls all commits (needed for computing the next version)
fetch-depth: 0
# pulls all tags (needed for computing the next version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Checkout last tag
run: git checkout $(git describe --abbrev=0 --tags)
- uses: ./.github/actions/e2e-clean
with:
cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
e2e-report:
name: End-to-end status reporter
timeout-minutes: 30
if: ${{ always() }}
needs: e2e
runs-on: ubuntu-20.04
environment: Daily Tests
steps:
- name: Check e2e matrix status
if: ${{ needs.e2e.result != 'success' }}
run: curl --request POST --url ${{ secrets.SLACK_WEBHOOK }}