Skip to content

Commit 17860ee

Browse files
Update CI Documentation and code chech
1 parent e54c32d commit 17860ee

File tree

3 files changed

+109
-7
lines changed

3 files changed

+109
-7
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ jobs:
2020
fastlane_task: 'unit_tests'
2121
xcode_version: 16.2
2222
code_coverage: true
23-
24-
# - os: macos-15
25-
# task_title: 'UI Tests'
26-
# fastlane_task: 'ui_tests'
27-
# xcode_version: 16.2
28-
# code_coverage: false
2923
runs-on: ${{ matrix.os }}
3024
steps:
3125
- uses: actions/checkout@v3

.github/workflows/documentation.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Run ${{ matrix.task_title }}
4444
run: fastlane ${{ matrix.fastlane_task }}
4545

46-
- name: Install dependency
46+
- name: Install sourcekitten
4747
run: brew install sourcekitten
4848

4949
- name: Extract comment docs
@@ -58,6 +58,9 @@ jobs:
5858
sourcekitten doc --module-name ReceiptRepository > TempJson/ReceiptRepository.json
5959
sourcekitten doc --module-name Receipt > TempJson/Receipt.json
6060
61+
- name: Install jazzy
62+
run: gem install jazzy
63+
6164
- name: Generate documentation
6265
run: |
6366
jazzy \

.github/workflows/master_ci.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Core UI SDK CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
jobs:
9+
tests:
10+
name: Tests
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- os: macos-15
16+
task_title: 'Unit Tests'
17+
fastlane_task: 'unit_tests'
18+
xcode_version: 16.2
19+
code_coverage: true
20+
- os: macos-15
21+
task_title: 'UI Tests'
22+
fastlane_task: 'ui_tests'
23+
xcode_version: 16.2
24+
code_coverage: false
25+
runs-on: ${{ matrix.os }}
26+
steps:
27+
- uses: actions/checkout@v3
28+
29+
- name: Setup Xcode
30+
uses: maxim-lobanov/setup-xcode@v1
31+
with:
32+
xcode-version: '${{ matrix.xcode_version }}'
33+
34+
- name: Carthage [Setup cache]
35+
uses: actions/cache@v3
36+
with:
37+
path: Carthage
38+
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
39+
restore-keys: |
40+
${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
41+
42+
- name: Carthage [Install dependencies]
43+
run: carthage bootstrap
44+
--platform ios
45+
--cache-builds
46+
--use-xcframeworks
47+
--no-use-binaries
48+
49+
- name: Run ${{ matrix.task_title }}
50+
run: fastlane ${{ matrix.fastlane_task }}
51+
52+
- name: Install Lint
53+
run:
54+
brew install swiftlint
55+
56+
- name: Lint validation
57+
if: matrix.code_coverage
58+
run:
59+
swiftlint lint --strict --reporter json
60+
61+
- name: Code Coverage [Build report]
62+
if: matrix.code_coverage
63+
run: |
64+
brew install llvm
65+
export PATH="$(brew --prefix llvm)/bin:$PATH"
66+
llvm-cov report \
67+
--use-color \
68+
--instr-profile=$(find ./output -name "*.profdata") \
69+
--object $(find ./output -name "Common") \
70+
--object $(find ./output -name "TransferMethod") \
71+
--object $(find ./output -name "TransferMethodRepository") \
72+
--object $(find ./output -name "Receipt") \
73+
--object $(find ./output -name "ReceiptRepository") \
74+
--object $(find ./output -name "Transfer") \
75+
--object $(find ./output -name "TransferRepository") \
76+
--object $(find ./output -name "UserRepository") \
77+
--object $(find ./output -name "BalanceRepository") \
78+
-ignore-filename-regex="Coordinators|AddTransferMethodSectionData|HyperwalletCoordinatorTypes|Sources/Helper|Sources/Extensions|Sources/View" \
79+
-ignore-filename-regex="Cell.swift|HyperwalletUI.swift|Controller.swift"
80+
81+
- name: Code Coverage [Export report to lcov format]
82+
if: matrix.code_coverage
83+
run: |
84+
export PATH="$(brew --prefix llvm)/bin:$PATH"
85+
mkdir coverage
86+
llvm-cov export \
87+
--format=lcov > ./coverage/lcov.info \
88+
--instr-profile=$(find ./output -name "*.profdata") \
89+
--object $(find ./output -name "Common") \
90+
--object $(find ./output -name "TransferMethod") \
91+
--object $(find ./output -name "TransferMethodRepository") \
92+
--object $(find ./output -name "Receipt") \
93+
--object $(find ./output -name "ReceiptRepository") \
94+
--object $(find ./output -name "Transfer") \
95+
--object $(find ./output -name "TransferRepository") \
96+
--object $(find ./output -name "UserRepository") \
97+
--object $(find ./output -name "BalanceRepository") \
98+
-ignore-filename-regex="Coordinators|AddTransferMethodSectionData|HyperwalletCoordinatorTypes|Sources/Helper|Sources/Extensions|Sources/View" \
99+
-ignore-filename-regex="Cell.swift|HyperwalletUI.swift|Controller.swift"
100+
101+
- name: Post to Coveralls
102+
if: matrix.code_coverage
103+
uses: coverallsapp/github-action@master
104+
with:
105+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)