-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.7 KB
/
test-command.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
name: test
on:
repository_dispatch:
types: [test-command]
permissions:
id-token: write
contents: read
defaults:
run:
# We need -e -o pipefail for consistency with GitHub Actions' default behavior
shell: bash -e -o pipefail {0}
jobs:
# Parse the command, so we can decide which tests to run. Examples: "/test all", "/test validate", "/test e2e"
# We can do as many of these as we want to get as granular as we want.
parse:
runs-on: ubuntu-latest
outputs:
run-e2e-commercial-insecure: ${{ steps.parse.outputs.run-e2e-commercial-insecure }}
steps:
- name: Parse Args
id: parse
uses: defenseunicorns/delivery-github-actions-workflows/.github/actions/parse-test@main
# Update the comment that triggered the /test command to show the run url
comment:
runs-on: ubuntu-latest
steps:
- name: Update Comment
uses: defenseunicorns/delivery-github-actions-workflows/.github/actions/comment@main
with:
application_id: ${{ secrets.NARWHAL_BOT_APP_ID }}
application_private_key: ${{ secrets.NARWHAL_BOT_SECRET }}
e2e-commercial-insecure:
needs: parse
if: needs.parse.outputs.run-e2e-commercial-insecure == 'true'
runs-on: ubuntu-latest
steps:
- name: e2e-commercial-insecure
uses: defenseunicorns/delivery-github-actions-workflows/.github/actions/e2e@main
with:
application_id: ${{ secrets.NARWHAL_BOT_APP_ID }}
application_private_key: ${{ secrets.NARWHAL_BOT_SECRET }}
region: us-east-2
role-to-assume: ${{ secrets.NARWHAL_AWS_COMMERCIAL_ROLE_TO_ASSUME }}
github-context: "test / e2e-commercial-insecure"
test-to-run: "insecure"