Continuous deployment of next to QA and Test #2652
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: Continuous deployment | |
| run-name: Continuous deployment of ${{ github.ref_name }} to QA and Test | |
| on: | |
| push: | |
| branches: [next] | |
| jobs: | |
| test: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| uses: ./.github/workflows/test.yml | |
| deploy: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| environment: [qa, test] | |
| permissions: | |
| id-token: write | |
| uses: ./.github/workflows/deploy.yml | |
| with: | |
| environment: ${{ matrix.environment }} | |
| server_types: all | |
| run_pre_deploy_migrations: false | |
| end-to-end-tests: | |
| needs: [deploy] | |
| uses: ./.github/workflows/call-end-to-end-tests.yml | |
| secrets: inherit | |
| with: | |
| cross_service_tests: true | |
| endpoint: https://qa.mavistesting.com | |
| github_ref: main | |
| slack-notification: | |
| needs: [deploy, test, end-to-end-tests] | |
| runs-on: ubuntu-latest | |
| permissions: {} | |
| if: ${{ !cancelled() }} | |
| steps: | |
| - name: Send Slack notification about failed deployment | |
| if: needs.test.result == 'failure' || needs.deploy.result == 'failure' | |
| uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 | |
| with: | |
| webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }} | |
| webhook-type: incoming-webhook | |
| errors: true | |
| # yamllint disable rule:line-length | |
| payload: | | |
| text: ":rotating_light: Continuous Deployment failed :rotating_light:" | |
| blocks: | |
| - type: "section" | |
| text: | |
| type: "mrkdwn" | |
| text: ":rotating_light: *Continuous Deployment failed* :rotating_light:\nPull request merged by: <https://github.com/${{ github.actor }}|${{ github.actor }}>\n\n \ | |
| <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>" | |
| # yamllint enable rule:line-length | |
| - name: Send Slack notification about failed E2E tests | |
| if: needs.end-to-end-tests.result == 'failure' | |
| uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 | |
| with: | |
| webhook: ${{ secrets.SLACK_MAVIS_TECH_WEBHOOK_URL }} | |
| webhook-type: incoming-webhook | |
| errors: true | |
| # yamllint disable rule:line-length | |
| payload: | | |
| text: ":rotating_light: E2E tests failed on next :rotating_light:" | |
| blocks: | |
| - type: "section" | |
| text: | |
| type: "mrkdwn" | |
| text: ":rotating_light: *E2E tests failed on next* :rotating_light:\nPull request merged by: <https://github.com/${{ github.actor }}|${{ github.actor }}>\n\n \ | |
| <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>" | |
| # yamllint enable rule:line-length |