Test - Workflow for Testing #73
Workflow file for this run
This file contains hidden or 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 - Workflow for Testing | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'This is an example of an input' | |
| required: true | |
| flow_results_json: | |
| description: 'Maestro flow results JSON to feed the analyzer' | |
| required: true | |
| default: '[{"status":"SUCCESS"}]' | |
| console_url: | |
| description: 'Optional console URL for logging / tasks' | |
| required: false | |
| default: '' | |
| upload_status: | |
| description: 'Optional upload status for logging' | |
| required: false | |
| default: 'SUCCESS' | |
| app_binary_id: | |
| description: 'Optional app binary ID for logging' | |
| required: false | |
| default: '123412412' | |
| treat_canceled_as_failure: | |
| description: 'Treat CANCELED flows as failures (true/false)' | |
| required: false | |
| default: 'false' | |
| env: | |
| ASANA_PAT: ${{ secrets.ASANA_ACCESS_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GT_DAXMOBILE }} | |
| jobs: | |
| test-workflow: | |
| runs-on: ubuntu-latest | |
| name: Add here whatever steps you want to test | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| token: ${{ secrets.GT_DAXMOBILE }} | |
| ref: ${{ github.event.inputs.ref }} | |
| - name: Analyze Maestro Flow Results | |
| if: always() | |
| id: analyze-maestro | |
| uses: ./.github/actions/maestro-flow-analyzer | |
| with: | |
| flow_results_json: ${{ github.event.inputs.flow_results_json }} | |
| console_url: ${{ github.event.inputs.console_url }} | |
| upload_status: ${{ github.event.inputs.upload_status }} | |
| app_binary_id: ${{ github.event.inputs.app_binary_id }} | |
| treat_canceled_as_failure: ${{ github.event.inputs.treat_canceled_as_failure }} | |
| - name: Show analyzer output | |
| if: always() | |
| run: | | |
| echo "flow_summary_status=${{ steps.analyze-maestro.outputs.flow_summary_status }}" | |
| echo "flow_summary_message<<'EOF'" | |
| echo "${{ steps.analyze-maestro.outputs.flow_summary_message }}" | |
| echo "EOF" | |
| - name: Create Asana task when Maestro not successful | |
| if: ${{ always() && steps.analyze-maestro.outputs.flow_summary_status != 'success' }} | |
| uses: duckduckgo/native-github-asana-sync@v2.0 | |
| with: | |
| asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }} | |
| asana-project: ${{ vars.GH_ANDROID_APP_PROJECT_ID }} | |
| asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }} | |
| asana-task-name: GH Workflow - Maestro run issue (test_workflow) | |
| asana-task-description: | | |
| Run: https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} | |
| Console: ${{ github.event.inputs.console_url }} | |
| Status: ${{ steps.analyze-maestro.outputs.flow_summary_status }} | |
| Summary: | |
| ${{ steps.analyze-maestro.outputs.flow_summary_message }} | |
| action: 'create-asana-task' |