-
Notifications
You must be signed in to change notification settings - Fork 101
45 lines (42 loc) · 1.44 KB
/
functional-tests.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
name: functional-tests
on:
# we use pull_request_target to run the CI also for forks
pull_request_target:
types: [opened, reopened, synchronize, labeled]
push:
branches: [main]
jobs:
# workflow that is invoked when for PRs with labels 'enable-functional-tests'
functional-tests-pr:
name: Functional Tests - PR
if: contains(github.event.pull_request.labels.*.name, 'enable-functional-tests')
uses: ./.github/workflows/functional-tests-workflow.yml
secrets: inherit
strategy:
matrix:
aws-region: ['us-east-1', 'eu-central-1']
permissions:
id-token: write
contents: read
with:
# this allows to pick the branch from the PR
checkout-ref: ${{ github.event.pull_request.head.ref }}
# this allows to work on fork
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}
aws-region: ${{ matrix.aws-region }}
# workflow that is invoked when a push to main happens
functional-tests-main:
name: Functional Tests - main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/functional-tests-workflow.yml
secrets: inherit
strategy:
matrix:
aws-region: ['us-east-1', 'eu-central-1']
permissions:
id-token: write
contents: read
with:
checkout-ref: ${{ github.ref }}
checkout-repository: ${{ github.repository }}
aws-region: ${{ matrix.aws-region }}