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: TEST_PLAN_REPO: "laurentsenta/test-plans" TEST_PLAN_BRANCH: "feat/ping-interop" 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