-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (63 loc) · 1.83 KB
/
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
name: End-to-end tests
on:
workflow_call:
inputs:
clientId:
description: Client ID to use for authentication
required: true
type: string
oktaOrgUrl:
description: Okta organization URL
required: false
type: string
oktaAuthServer:
description: Okta authentication server identifier
required: false
type: string
ref:
description: Reference branch, tag or commit SHA to checkout
required: false
type: string
default: main
target:
description: Makefile test target to run
required: false
type: string
default: test/e2e
sloctlImage:
description: >
Sloctl docker image to use for e2e docker image tests.
If not provided, the image will be built inside the workflow.
type: string
required: false
secrets:
clientSecret:
description: Client secret to use for authentication
required: true
jobs:
test:
name: Run e2e tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
repository: nobl9/sloctl
ref: ${{ inputs.ref }}
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Run tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: make "$TEST_TARGET"
env:
SLOCTL_CLIENT_ID: ${{ inputs.clientId }}
SLOCTL_CLIENT_SECRET: ${{ secrets.clientSecret }}
SLOCTL_OKTA_ORG_URL: ${{ inputs.oktaOrgUrl }}
SLOCTL_OKTA_AUTH_SERVER: ${{ inputs.oktaAuthServer }}
SLOCTL_E2E_DOCKER_TEST_IMAGE: ${{ inputs.sloctlImage }}
TEST_TARGET: ${{ inputs.target }}