Skip to content

Commit 91bfb3f

Browse files
committed
Explicitly set derived data path for “Build and test" and "Upload code coverage report"
1 parent 8df25df commit 91bfb3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
build:
88
name: Build and test
99
runs-on: macos-latest
10+
env:
11+
DERIVED_DATA_PATH: 'DerivedData'
1012
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
1113
steps:
1214
- uses: actions/checkout@v2
@@ -21,11 +23,11 @@ jobs:
2123
./Scripts/process.sh
2224
exit $?
2325
- name: Build and test
24-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme 'CryptomatorCryptoLib' -destination 'platform=macOS' -enableCodeCoverage YES clean test | xcpretty
26+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme 'CryptomatorCryptoLib' -destination 'platform=macOS' -derivedDataPath $DERIVED_DATA_PATH -enableCodeCoverage YES clean test | xcpretty
2527
- name: Upload code coverage report
2628
run: |
2729
gem install slather
28-
slather coverage -x -i '../../../Library/*' --scheme CryptomatorCryptoLib CryptomatorCryptoLib.xcodeproj
30+
slather coverage -x --build-directory $DERIVED_DATA_PATH --ignore "$DERIVED_DATA_PATH/SourcePackages/*" --scheme CryptomatorCryptoLib CryptomatorCryptoLib.xcodeproj
2931
bash <(curl -Ls https://coverage.codacy.com/get.sh)
3032
env:
3133
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}

0 commit comments

Comments
 (0)