Skip to content

Cluster Scene Test (Dev) #7

Cluster Scene Test (Dev)

Cluster Scene Test (Dev) #7

name: Cluster Scene Test (Dev)
on:
workflow_dispatch:
inputs:
testCase:
description: "specify a case or skip to run all tests"
default: ""
required: false
jobs:
cluster-scene-test-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
- name: Restore Go modules cache
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: go-${{ runner.os }}-${{ hashFiles('go.mod') }}
restore-keys: |
go-${{ runner.os }}-
- name: Run tests
run: |
if [ -z ${{ github.event.inputs.testCase }} ]; then
echo "Running all tests"
go run gotest.tools/gotestsum@latest --format standard-verbose -- sceneTest/cluster/* -timeout 20m -args --project-id 3200488 --config "${{ secrets.TEST_CONFIG_DEV }}" --test.timeout 20m
else
echo "Running test ${{ github.event.inputs.testCase }}"
go run gotest.tools/gotestsum@latest --format standard-verbose -- sceneTest/cluster/* -args --project-id 3200488 --config "${{ secrets.TEST_CONFIG_DEV }}" --test.run ${{ github.event.inputs.testCase }}
fi