-
Notifications
You must be signed in to change notification settings - Fork 3
104 lines (87 loc) · 2.87 KB
/
build-and-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
101
102
103
104
name: Build and Test
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-test-ios:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
with:
ruby-version: '3.2.1'
bundler-cache: true
- name: Run unit tests
run: bundle exec fastlane ios tests
- name: Generate Coverage Report
continue-on-error: true
run: |
cd Build/Build/ProfileData
cd $(ls -d */|head -n 1)
pathCoverage=Build/Build/ProfileData/${PWD##*/}/Coverage.profdata
cd ${{ github.workspace }}
xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage Build/Build/Products/Debug-iphonesimulator/AmplifyUtilsNotifications.o > AmplifyUtilsNotifications-Coverage.lcov
- name: Upload Report
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
continue-on-error: true
with:
flags: AmplifyUtilsNotifications
- name: Run integration tests
run: bundle exec fastlane ios integration_tests
build-test-macos:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
with:
ruby-version: '3.2.1'
bundler-cache: true
- name: Run unit tests
run: bundle exec fastlane mac tests
build-test-tvos:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
with:
ruby-version: '3.2.1'
bundler-cache: true
- name: Run unit tests
run: bundle exec fastlane tvos tests
build-test-watchos:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
- name: Setup Ruby
uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7 # v1.171.0
with:
ruby-version: '3.2.1'
bundler-cache: true
- name: Run unit tests
run: bundle exec fastlane watchos tests