Run Robot Test #72
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 Robot Test | |
on: | |
workflow_dispatch: | |
inputs: | |
run-id: | |
description: "workflow run identifier" | |
required: false | |
url: | |
description: "Which URL to check" | |
required: false | |
default: "https://duckduckgo.com/" | |
text: | |
description: "Which text to check on the URL" | |
required: false | |
default: "DuckDuckGo" | |
env: | |
RUN_ID: ${{ github.event.inputs.run-id }} | |
URL: ${{ github.event.inputs.url }} | |
TEXT: ${{ github.event.inputs.text }} | |
jobs: | |
printInputs: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
echo "This test run with ID: ${{ env.RUN_ID }} will check if the text ${{ env.TEXT }} is present on ${{ env.URL }}" | |
robot_test: | |
runs-on: ubuntu-latest | |
name: ${{github.event.inputs.run-id}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Robot Framework | |
uses: joonvena/[email protected] | |
with: | |
robot_options: "-v URL:${{ env.URL }} -v TEXT:${{ env.TEXT }} --xunit xunit-report/xunit" | |
- name: Upload test results to BuildPulse for flaky test detection | |
if: '!cancelled()' # Run this step even when the tests fail. Skip if the workflow is cancelled. | |
uses: buildpulse/buildpulse-action@main | |
with: | |
account: ${{ secrets.BUILDPULSE_ACCOUNT }} | |
repository: ${{ secrets.BUILDPULSE_REPOSITORY }} | |
path: | | |
${{ github.workspace }}/xunit-report | |
key: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }} | |
secret: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }} | |
- name: Upload test results | |
uses: actions/upload-artifact@v1 | |
if: always() | |
with: | |
name: reports | |
path: ${{ github.workspace }}/reports |