File tree Expand file tree Collapse file tree 4 files changed +34
-8
lines changed
Expand file tree Collapse file tree 4 files changed +34
-8
lines changed Original file line number Diff line number Diff line change 5151 name : " 🤖 Unit tests"
5252 needs : [sharedInputs, buildFFI]
5353 uses : ./.github/workflows/test_macos14_arm64.yml
54+ secrets :
55+ codecov_token : ${{ secrets.CODECOV_TOKEN }}
5456 with :
5557 rust-target-path : ${{ needs.sharedInputs.outputs.rust-target-path }}
5658 binaries-path : ${{ needs.sharedInputs.outputs.binaries-path }}
Original file line number Diff line number Diff line change 1515 cache-restore-key :
1616 required : true
1717 type : string
18+ secrets :
19+ codecov_token :
20+ required : true
21+ workflow_dispatch :
1822
1923jobs :
2024 testMacOS14 :
6468
6569 - name : " ⬆️ Upload coverage reports"
6670 uses : codecov/codecov-action@v4
67- env :
68- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
6971 with :
72+ token : ${{ secrets.codecov_token }}
73+ file : " .build/artifacts/${{ env.SCHEME }}-TestResultBundle.xcresult"
74+ directory : " .build/artifacts"
7075 fail_ci_if_error : true
7176 flags : unittests
7277 name : PactSwiftMockServer
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ source "$SOURCE_DIR/utils.sh"
2626
2727# Properties
2828SCHEME_TARGET_PAIRS=()
29- BUILD_PATH=" .build"
29+ BUILD_PATH=" $SOURCE_DIR /../ .build"
3030
3131# ##############
3232# "private"
7474 done
7575fi
7676
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-
8177# Run tests
8278for INDEX in " ${SCHEME_TARGET_PAIRS[@]} " ; do
8379 SCHEME=" ${INDEX%%:::* } "
8480 TARGET=" ${INDEX##*:: } "
81+ RESULT_BUNDLE_PATH=" $BUILD_PATH /artifacts/$SCHEME -TestResultBundle.xcresult"
82+
83+ if [ $( folderExists " $RESULT_BUNDLE_PATH " ) == true ]; then
84+ # Remove build data by previous runs
85+ echo " ℹ️ Reoving results bundle from previous runs..."
86+ executeCommand " rm -fr $RESULT_BUNDLE_PATH "
87+ fi
8588
8689 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"
90+ executeCommand " xcodebuild -project \" PactSwiftMockServer.xcodeproj\" -scheme \" $SCHEME \" -destination \" $TARGET \" -enableCodeCoverage YES -derivedDataPath \" $BUILD_PATH /DerivedData\" -resultBundlePath \" $RESULT_BUNDLE_PATH \" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES build test | xcbeautify"
8891done
Original file line number Diff line number Diff line change @@ -29,3 +29,19 @@ function executeCommand {
2929 eval " $COMMAND "
3030 fi
3131}
32+
33+ function folderExists {
34+ if [ ! -d " $1 " ]; then
35+ echo false
36+ else
37+ echo true
38+ fi
39+ }
40+
41+ function fileExists {
42+ if [ ! -f " $1 " ]; then
43+ echo false
44+ else
45+ echo true
46+ fi
47+ }
You can’t perform that action at this time.
0 commit comments