-
Notifications
You must be signed in to change notification settings - Fork 886
100 lines (91 loc) · 3.15 KB
/
integ-test.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Integration Test
on:
workflow_call:
inputs:
identifier:
required: true
type: string
pull_request_target:
branches:
- main
permissions:
id-token: write
contents: read
concurrency:
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validation:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request || (github.event.pull_request.user.login == 'awsmobilesdk' || contains(fromJSON('["OWNER", "MEMBER"]'), github.event.pull_request.author_association)) }}
steps:
- run: echo "Integration Tests can be run"
integration-test:
needs: [validation]
name: Integration Test
environment: IntegrationTest
strategy:
fail-fast: false
matrix:
scheme:
- AWSMobileClient
- AWSAutoScaling
- AWSCloudWatch
- AWSComprehend
- AWSCore
- AWSDynamoDB
- AWSEC2
- AWSElasticLoadBalancing
- AWSIoT
- AWSKMS
- AWSKinesis
- AWSKinesisVideoSignaling
- AWSLambda
- AWSLex
- AWSPinpoint
- AWSPolly
- AWSRekognition
- AWSS3
- AWSSES
- AWSSNS
- AWSSQS
- AWSTextract
- AWSTranscribe
- AWSTranscribeStreaming
- AWSTranslate
include:
- project: AWSiOSSDKv2.xcodeproj
- project: AWSAuthSDK/AWSAuthSDK.xcodeproj
scheme: AWSMobileClient
runs-on: macos-12
steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: ${{ github.event.pull_request.head.sha || github.ref_name }}
persist-credentials: false
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 3600
aws-region: us-east-1
role-session-name: "integ-test.${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}"
- name: Build testconfiguration
run: ./Scripts/generate-test-config.sh -p ios -v
shell: bash
- name: ${{ matrix.scheme }}
run: |
xcodebuild test -project ${{ matrix.project }} \
-scheme ${{ matrix.scheme }} \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 14,OS=latest" \
-only-testing:"${{ matrix.scheme }}Tests" | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
- name: Additional AWSMobileClient integration test targets
if: ${{ matrix.scheme == 'AWSMobileClient' }}
run: |
xcodebuild test -project ${{ matrix.project }} \
-scheme ${{ matrix.scheme }} \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 14,OS=latest" \
-only-testing:AWSMobileClientCustomAuthTests | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}