Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Conditionally Run GHES Test Suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Udit committed Dec 24, 2020
1 parent 5863a2b commit f88876b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ghes-acceptance-tests-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@ on:
- cron: '0 0 * * *'

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
Expand All @@ -26,6 +38,8 @@ jobs:
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
Expand Down Expand Up @@ -55,6 +69,8 @@ jobs:
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
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ghes-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@ on:
- test/**

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
Expand All @@ -21,6 +33,8 @@ jobs:
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
Expand All @@ -36,6 +50,8 @@ jobs:
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
Expand Down

0 comments on commit f88876b

Please sign in to comment.