Skip to content

Commit dc4454c

Browse files
committed
💻 ci: Fix code coverage issue
1 parent 3a5b25b commit dc4454c

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

.github/workflows/testing.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,34 @@ jobs:
2121
echo "MarvelPrivateKey=$MarvelPrivateKey" >> .env
2222
- name: Install Bundler
2323
run: gem install bundler
24-
- name: Install xcpretty
25-
run: gem install xcpretty
24+
- name: Install xcpretty and slather
25+
run: |
26+
gem install xcpretty
27+
gem install slather
2628
- name: Install Gems
2729
run: |
2830
bundle install
2931
bundle binstubs arkana
3032
bin/arkana
3133
- name: Build & Test
32-
run: xcodebuild clean build test -project SwiftyMarvel.xcodeproj -scheme SwiftyMarvel -destination "platform=iOS Simulator,OS=16.2,name=iPhone 14" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES -enableCodeCoverage YES -verbose | xcpretty
34+
run: |
35+
xcodebuild clean build test \
36+
-project SwiftyMarvel.xcodeproj \
37+
-scheme SwiftyMarvel \
38+
-destination "platform=iOS Simulator,name=iPhone 15" \
39+
-testPlan SwiftyMarvel \
40+
-derivedDataPath DerivedData \
41+
CODE_SIGN_IDENTITY="" \
42+
CODE_SIGNING_REQUIRED=NO \
43+
ONLY_ACTIVE_ARCH=YES \
44+
-enableCodeCoverage YES | xcpretty
3345
- name: Prepare code coverage report
34-
run: slather
46+
run: |
47+
slather coverage \
48+
--build-directory DerivedData \
49+
--scheme SwiftyMarvel \
50+
--configuration Debug \
51+
SwiftyMarvel.xcodeproj
3552
- name: Upload Code Coverage to Codecov
3653
uses: codecov/codecov-action@v3
3754
with:

.slather.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@ coverage_service: cobertura_xml
22
xcodeproj: SwiftyMarvel.xcodeproj
33
scheme: SwiftyMarvel
44
output_directory: ./
5+
build_directory: DerivedData
6+
ignore:
7+
- "SwiftyMarvelTests/*"
8+
- "SwiftyMarvelUITests/*"
9+
- "MockingbirdMocks/*"
10+
- "MockingbirdSupport/*"
11+
- "ArkanaKeys/*"

0 commit comments

Comments
 (0)