| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- on:
- workflow_call:
- inputs:
- stage:
- required: true
- type: string
- project:
- required: true
- type: string
- cluster:
- required: true
- type: string
- host:
- required: true
- type: string
- secrets:
- token:
- required: true
- slack_webhook_url:
- required: true
- env:
- repo: porter
- name: Run app tests
- jobs:
- integration-tests:
- name: Run app tests
- runs-on: ubuntu-latest
- timeout-minutes: 7
- strategy:
- matrix:
- yaml: ['js-test-app-buildpack', 'js-test-app-dockerfile', 'nginx', 'next-test-app-dockerfile']
- fail-fast: false
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- repository: porter-dev/app-integration-tests
- ref: refs/heads/main
- - name: Run test
- uses: ./.github/actions
- with:
- host: ${{ inputs.host }}
- project: ${{ inputs.project }}
- cluster: ${{ inputs.cluster }}
- token: ${{ secrets.token }}
- yaml_file: ./test-yamls/${{ matrix.yaml }}.yaml
- app_name: ${{ env.repo }}-${{ matrix.yaml }}
- notify-on-failure:
- name: Notify on failure
- needs: integration-tests
- runs-on: ubuntu-latest
- if: failure()
- steps:
- - name: Notify Slack on failure
- env:
- RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- run: |
- curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"<!subteam^S05MGRLKF33> \`${{ env.repo }}\` integration tests failed in \`${{ inputs.STAGE }}\`: $RUN_URL \"}" ${{ secrets.slack_webhook_url }}
|