libp2p-test-plans/.github/workflows/run-composition.yml

65 lines
2.0 KiB
YAML
Raw Normal View History

name: Run composition file with a custom git reference
on:
workflow_call:
inputs:
composition_file:
required: true
type: string
custom_git_reference:
required: false
type: string
custom_git_target:
required: false
type: string
testground_endpoint:
required: false
type: string
jobs:
run_test:
name: Run a test with different versions
runs-on: ubuntu-latest
env:
2022-07-01 10:22:40 +00:00
TEST_PLAN_REPO: "libp2p/test-plans"
TEST_PLAN_BRANCH: "master"
TESTGROUND_ENDPOINT: ${{ inputs.testground_endpoint }}
defaults:
run:
shell: bash
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
path: test-plans
repository: ${{ env.TEST_PLAN_REPO }}
ref: ${{ env.TEST_PLAN_BRANCH }}
- name: setup testground
uses: ./test-plans/.github/actions/setup-testground
- name: Import the plan
working-directory: ./test-plans
run: |
testground plan import --from ./ --name libp2p
- name: Run the composition file
working-directory: ./test-plans
run: |
GitReference=${{ inputs.custom_git_reference }} \
GitTarget=${{ inputs.custom_git_target }} \
testground run composition \
-f ${{ inputs.composition_file }} \
--metadata-repo "${GITHUB_REPOSITORY}" \
--metadata-branch "${GITHUB_REF#refs/heads/}" \
--metadata-commit "${GITHUB_SHA}" \
--collect-file ./result.tgz \
--collect --wait
env:
GitReference: ${{ inputs.custom_git_reference }}
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: testground-output
path: |
~/testground/
~/test-plans/result.tgz
testground.*
test-plans/*.out