test-harness-runner #621
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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/[email protected] | |
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 | |