-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.35 KB
/
branch-scene-test.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
name: Branch Scene Test
on:
schedule:
- cron: "0 * * * *" # every hour
workflow_dispatch:
inputs:
testCase:
description: "specify a case or skip to run all tests"
default: ""
required: false
jobs:
branch-scene-test:
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/branch/* -project-id 1372813089454562808 -config "${{ secrets.TEST_CONFIG }}" -timeout 20m
else
echo "Running test ${{ github.event.inputs.testCase }}"
go run gotest.tools/gotestsum@latest --format standard-verbose -- sceneTest/branch/* -project-id 1372813089454562808 -config "${{ secrets.TEST_CONFIG }}" -run ${{ github.event.inputs.testCase }}
fi