Run E2E tests #8
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: "Run E2E tests" | |
on: | |
workflow_call: | |
inputs: | |
image_version: | |
type: string | |
description: "Version for the control-api and data-api images" | |
workflow_dispatch: | |
inputs: # yep, exactly the same: https://github.com/orgs/community/discussions/39357 | |
image_version: | |
type: string | |
description: "Version for the control-api and data-api images" | |
jobs: | |
run_e2e_workflow: | |
name: "Run E2E workflow and get a result" | |
runs-on: ubuntu-latest | |
env: | |
TIMEOUT: 1800 | |
steps: | |
- name: Dispatch an action and get the run ID | |
uses: codex-/return-dispatch@v1 | |
id: return_dispatch | |
with: | |
token: ${{ secrets.ROBOT_GITHUB_E2E_WORKFLOW_TOKEN }} | |
ref: refs/heads/main | |
repo: datalens-ui | |
owner: datalens-tech | |
workflow: e2e_tests.yml | |
# https://github.com/Codex-/return-dispatch/issues/203 | |
workflow_inputs: > | |
{"control-api": "${{ inputs.image_version }}", "data-api": "${{ inputs.image_version }}"} | |
workflow_timeout_seconds: ${{ env.TIMEOUT }} | |
- name: Output the run URL | |
run: | | |
URL=https://github.com/datalens-tech/datalens-ui/actions/runs/${{ steps.return_dispatch.outputs.run_id }} | |
echo "::notice title=𝐄𝟐𝐄 workflow URL::$URL" | |
- name: Await Run ID ${{ steps.return_dispatch.outputs.run_id }} | |
uses: codex-/[email protected] | |
with: | |
token: ${{ github.token }} | |
repo: datalens-ui | |
owner: datalens-tech | |
run_id: ${{ steps.return_dispatch.outputs.run_id }} | |
run_timeout_seconds: ${{ env.TIMEOUT }} |