-
Notifications
You must be signed in to change notification settings - Fork 66
73 lines (66 loc) · 2.59 KB
/
test-runner.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: test-harness-runner
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1,3,6"
jobs:
get-test-harnesses:
name: Get Test Harnesses
runs-on: ubuntu-latest
if: (github.event_name == 'schedule' && github.repository == 'openwallet-foundation/owl-agent-test-harness') || (github.event_name != 'schedule')
outputs:
harnesses: ${{ steps.get-file-list.outputs.files }}
repo-name: ${{ steps.get-repo-info.outputs.name }}
steps:
- name: Echo github info
run: echo '${{toJSON(github)}}'
- name: Get Repository Info
id: get-repo-info
run: |
repository="${{github.repository}}"
name=$(echo ${repository##*/})
echo "name=${name}" >> $GITHUB_OUTPUT
- name: Git checkout
uses: actions/checkout@v4
- name: Get File List
id: get-file-list
uses: the-coding-turtle/ga-file-list@v0.4.1
with:
directory: ".github/workflows"
file_extension: "yml"
# ==============================================
# Include all test harnesses by default.
# ==============================================
only_files_starts_with: "test-harness-"
# ==============================================
# Ignore specific test harnesses here
# ----------------------------------------------
# Ignore tests by renaming the GHA file for the
# test to have a prefix of "skip-". Line below
# is not really needed, but left in to make
# it clear the file are being ignored.
# ==============================================
ignore_files_starts_with: "skip-test-harness"
run-test-harness:
name: Run Test Harness
needs: [get-test-harnesses]
runs-on: ubuntu-latest
if: (github.event_name == 'schedule' && github.repository == 'openwallet-foundation/owl-agent-test-harness') || (github.event_name != 'schedule')
strategy:
max-parallel: 1
matrix:
test-workflow: ${{ fromJson(needs.get-test-harnesses.outputs.harnesses) }}
fail-fast: false
steps:
- name: ${{ matrix.test-workflow }}
timeout-minutes: 60
if: success() || failure()
uses: convictional/trigger-workflow-and-wait@v1.6.5
with:
workflow_file_name: ${{ matrix.test-workflow }}
owner: ${{ github.repository_owner }}
repo: ${{ needs.get-test-harnesses.outputs.repo-name }}
ref: ${{ github.event.ref }}
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
wait_workflow: true
wait_interval: 60