-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (76 loc) · 3.08 KB
/
bank-api-library.check.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
name: Check Bank API Library
on:
push:
paths:
- 'BankAPILibrary/**'
tags-ignore:
- '**'
pull_request:
paths:
- 'BankAPILibrary/**'
workflow_call:
secrets:
GINI_MOBILE_TEST_CLIENT_SECRET:
required: true
workflow_dispatch:
jobs:
check:
runs-on: macos-latest
strategy:
matrix:
target: [GiniBankAPILibrary, GiniBankAPILibraryPinning]
destination: ['platform=iOS Simulator,OS=17.2,name=iPhone SE (3rd generation)', 'platform=iOS Simulator,OS=18.1,name=iPhone 15 Pro Max']
steps:
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '15.3'
- name: Checkout
uses: actions/checkout@v4
- name: Check package GiniBankAPILibrary
run: |
cd BankAPILibrary/GiniBankAPILibrary
swift package update
- name: Check package GiniBankAPILibraryPinning
run: |
cd BankAPILibrary/GiniBankAPILibraryPinning
swift package update
- name: Build sdk targets
run: |
xcodebuild -workspace GiniMobile.xcworkspace -scheme "${{ matrix.target }}" -destination "${{ matrix.destination }}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
- name: Run unit tests
run: |
xcodebuild clean test -workspace GiniMobile.xcworkspace -scheme "${{ matrix.target }}Tests" -destination "${{ matrix.destination }}" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO
- name: Build example app and run integration tests
run: >
xcodebuild clean test
-project BankAPILibrary/GiniBankAPILibraryExample/GiniBankAPILibraryExample.xcodeproj
-scheme "GiniBankAPILibraryExampleTests"
-destination "${{ matrix.destination }}"
CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED=NO
ONLY_ACTIVE_ARCH=NO
CLIENT_ID="gini-mobile-test"
CLIENT_SECRET="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
- name: Build pinning example app and run integration tests
run: >
xcodebuild clean test
-project BankAPILibrary/GiniBankAPILibraryPinningExample/GiniBankAPILibraryPinningExample.xcodeproj
-scheme "GiniBankAPILibraryPinningExampleTests"
-destination "${{ matrix.destination }}"
-skip-testing:GiniBankAPILibraryPinningExampleTests/PinningWrongCertificatesIntegrationTests
CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED=NO
ONLY_ACTIVE_ARCH=NO
CLIENT_ID="gini-mobile-test"
CLIENT_SECRET="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
&&
xcodebuild clean test
-project BankAPILibrary/GiniBankAPILibraryPinningExample/GiniBankAPILibraryPinningExample.xcodeproj
-scheme "GiniBankAPILibraryPinningExampleTests"
-destination "${{ matrix.destination }}"
-only-testing:GiniBankAPILibraryPinningExampleTests/PinningWrongCertificatesIntegrationTests
CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED=NO
ONLY_ACTIVE_ARCH=NO
CLIENT_ID="gini-mobile-test"
CLIENT_SECRET="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"