Skip to content

Commit

Permalink
.github/actions/setup-testground: shortcircuit with edge releases (li…
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta authored Sep 7, 2022
1 parent 0d23871 commit 520162a
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/actions/setup-testground/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
name: start testground
description: setup a local testground instance
inputs:
testground_endpoint:
required: false
default: ''
testground_repository:
required: false
default: 'testground/testground'
testground_ref:
required: false
default: 'edge'

runs:
using: "composite"
steps:
# Default setup when we use the testground_ref == edge.
- name: Load testground
if: ${{ inputs.testground_ref == 'edge' }}
shell: bash
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/testground/testground/master/install.sh)"
# Custom setup (slower) when we use a different testground_ref
- name: Checkout testground
if: ${{ inputs.testground_ref != 'edge' }}
uses: actions/checkout@v2
with:
path: testground
repository: testground/testground
repository: ${{ inputs.testground_repository }}
ref: ${{ inputs.testground_ref }}

- name: Setup Go
uses: actions/setup-go@v2
if: ${{ inputs.testground_ref != 'edge' }}
uses: actions/setup-go@v3
with:
go-version: "1.16.x"
cache: true
go-version-file: 'testground/go.mod'
cache-dependency-path: testground/go.sum

- name: Install testground
run: make install || make install || make install || make install
if: ${{ inputs.testground_ref != 'edge' }}
run: make install || make install || make install # 3 retries in case of network drops.
working-directory: testground
shell: bash

- name: Run the daemon or configure the client
shell: bash
env:
TESTGROUND_ENDPOINT: ${{ inputs.testground_endpoint }}
run: |
if [[ ! -z "${TESTGROUND_ENDPOINT}" ]]; then
mkdir -p ~/testground/;
Expand Down

0 comments on commit 520162a

Please sign in to comment.