Skip to content

Commit ddccb56

Browse files
committed
tech: Tweaks to CI scripts
1 parent 2ede9ba commit ddccb56

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/test_macos14_arm64.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ jobs:
6363
sh Support/build_test
6464
6565
- name: "⬆️ Upload coverage reports"
66-
uses: codecov/codecov-action@v3
66+
uses: codecov/codecov-action@v4
67+
env:
68+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6769
with:
6870
override_branch: ${{ github.ref_name }}
69-
token: ${{ secrets.CODECOV_TOKEN }}
71+
verbose: true
72+
flags: unittests
73+
name: PactSwiftMockServer

Support/build_test

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ SOURCE_DIR="${BASH_SOURCE[0]%/*}"
2525
source "$SOURCE_DIR/utils.sh"
2626

2727
# Properties
28-
DERIVED_DATA_PATH=".build/DerivedData"
29-
DESTINATIONS=()
30-
SCHEMES=()
28+
SCHEME_TARGET_PAIRS=()
29+
BUILD_PATH=".build"
3130

3231
###############
3332
# "private"
@@ -47,8 +46,6 @@ Options:
4746
"
4847
}
4948

50-
SCHEME_TARGET_PAIRS=()
51-
5249
if [ $# -eq 0 ]; then
5350
# CI is setup with a matrix defining SCHEME and DESTINATION env vars
5451
SCHEME="${SCHEME:-"PactSwiftMockServer-macOS"}"
@@ -77,9 +74,15 @@ else
7774
done
7875
fi
7976

77+
# Remove build data by previous runs
78+
echo "ℹ️ Cleanning up build data of previous runs in '$BUILD_PATH'"
79+
executeCommand "rm -fr $BUILD_PATH"
80+
8081
# Run tests
8182
for INDEX in "${SCHEME_TARGET_PAIRS[@]}"; do
8283
SCHEME="${INDEX%%:::*}"
8384
TARGET="${INDEX##*::}"
84-
executeCommand "xcodebuild clean test -project \"PactSwiftMockServer.xcodeproj\" -scheme \"$SCHEME\" -destination \"$TARGET\" -enableCodeCoverage YES -derivedDataPath \"$DERIVED_DATA_PATH\" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES | xcbeautify"
85+
86+
echo "🧪 Running tests"
87+
executeCommand "xcodebuild clean test -project \"PactSwiftMockServer.xcodeproj\" -scheme \"$SCHEME\" -destination \"$TARGET\" -enableCodeCoverage YES -derivedDataPath \"$BUILD_PATH/DerivedData\" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES | xcbeautify"
8588
done

0 commit comments

Comments
 (0)