41 lines
1001 B
YAML
41 lines
1001 B
YAML
name: start testground
|
|
description: setup a local testground instance
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Checkout testground
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: testground
|
|
repository: testground/testground
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: "1.16.x"
|
|
|
|
- name: Install testground
|
|
run: make install
|
|
working-directory: testground
|
|
shell: bash
|
|
|
|
- name: Run the daemon or configure the client
|
|
shell: bash
|
|
run: |
|
|
if [[ ! -z "${TESTGROUND_ENDPOINT}" ]]; then
|
|
mkdir -p ~/testground/;
|
|
cat <<EOF >> ~/testground/.env.toml
|
|
|
|
[client]
|
|
endpoint = "${TESTGROUND_ENDPOINT}"
|
|
EOF
|
|
else
|
|
mkdir -p ~/testground/;
|
|
cat <<EOF >> ~/testground/.env.toml
|
|
|
|
[daemon.scheduler]
|
|
task_timeout_min = 30
|
|
EOF
|
|
testground daemon > testground.out 2> testground.err &
|
|
fi; |