-
Notifications
You must be signed in to change notification settings - Fork 239
60 lines (58 loc) · 1.65 KB
/
app_tests_base.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 }}