forked from integrations/terraform-provider-github
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (100 loc) · 3.91 KB
/
ghes-acceptance-tests-all.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
name: GHES Acceptance Tests (All)
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: '0 0 * * 3'
jobs:
runtime:
runs-on: ubuntu-latest
steps:
- name: Query server address
id: server-address
run: |
SERVER_ADDRESS=$(dig +short terraformtesting-ghe.eastus.cloudapp.azure.com)
echo "::set-output name=server-address::${SERVER_ADDRESS}"
outputs:
server-address: ${{ steps.server-address.outputs.server-address }}
acceptance-tests-anonymous:
needs: [runtime]
if: ${{ needs.runtime.outputs.server-address != '255.255.255.255' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Acceptance Tests (Anonymous)
uses: terraformtesting/[email protected]
with:
GITHUB_BASE_URL: "https://terraformtesting-ghe.eastus.cloudapp.azure.com/"
acceptance-tests-individual:
needs: [runtime]
if: ${{ needs.runtime.outputs.server-address != '255.255.255.255' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Acceptance Tests (Individual)
id: acceptance-tests-individual
uses: terraformtesting/[email protected]
with:
TF_LOG: INFO
RUN_ALL: true
GITHUB_BASE_URL: "https://terraformtesting-ghe.eastus.cloudapp.azure.com/"
GITHUB_OWNER: administrator
GITHUB_TEST_USER_TOKEN: ${{ secrets.GHES_TEST_USER_TOKEN }}
- name: Failed Acceptance Tests (Individual)
if: ${{ failure() }}
uses: terraformtesting/[email protected]
with:
TF_LOG: DEBUG
RUN_ALLOWED: ${{ steps.acceptance-tests-individual.outputs.failed }}
GITHUB_BASE_URL: "https://terraformtesting-ghe.eastus.cloudapp.azure.com/"
GITHUB_OWNER: administrator
GITHUB_TEST_USER_TOKEN: ${{ secrets.GHES_TEST_USER_TOKEN }}
acceptance-tests-organization:
needs: [runtime]
if: ${{ needs.runtime.outputs.server-address != '255.255.255.255' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Acceptance Tests (Organization)
id: acceptance-tests-organization
uses: terraformtesting/[email protected]
with:
TF_LOG: INFO
RUN_ALL: true
GITHUB_BASE_URL: "https://terraformtesting-ghe.eastus.cloudapp.azure.com/"
GITHUB_ORGANIZATION: terraformtesting
GITHUB_TEST_USER_TOKEN: ${{ secrets.GHES_TEST_USER_TOKEN }}
- name: Failed Acceptance Tests (Organization)
uses: terraformtesting/[email protected]
if: ${{ failure() }}
with:
TF_LOG: DEBUG
RUN_ALLOWED: ${{ steps.acceptance-tests-organization.outputs.failed }}
GITHUB_BASE_URL: "https://terraformtesting-ghe.eastus.cloudapp.azure.com/"
GITHUB_ORGANIZATION: terraformtesting
GITHUB_TEST_USER_TOKEN: ${{ secrets.GHES_TEST_USER_TOKEN }}