Skip to content

Commit

Permalink
tech: Tweaks to CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
surpher committed Apr 25, 2024
1 parent ac95edb commit cc48aea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test_macos14_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ jobs:
sh Support/build_test
- name: "⬆️ Upload coverage reports"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
override_branch: ${{ github.ref_name }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
flags: unittests
name: PactSwiftMockServer
15 changes: 9 additions & 6 deletions Support/build_test
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ SOURCE_DIR="${BASH_SOURCE[0]%/*}"
source "$SOURCE_DIR/utils.sh"

# Properties
DERIVED_DATA_PATH=".build/DerivedData"
DESTINATIONS=()
SCHEMES=()
SCHEME_TARGET_PAIRS=()
BUILD_PATH=".build"

###############
# "private"
Expand All @@ -47,8 +46,6 @@ Options:
"
}

SCHEME_TARGET_PAIRS=()

if [ $# -eq 0 ]; then
# CI is setup with a matrix defining SCHEME and DESTINATION env vars
SCHEME="${SCHEME:-"PactSwiftMockServer-macOS"}"
Expand Down Expand Up @@ -77,9 +74,15 @@ else
done
fi

# Remove build data by previous runs
echo "ℹ️ Cleanning up build data of previous runs in '$BUILD_PATH'"
executeCommand "rm -fr $BUILD_PATH"

# Run tests
for INDEX in "${SCHEME_TARGET_PAIRS[@]}"; do
SCHEME="${INDEX%%:::*}"
TARGET="${INDEX##*::}"
executeCommand "xcodebuild clean test -project \"PactSwiftMockServer.xcodeproj\" -scheme \"$SCHEME\" -destination \"$TARGET\" -enableCodeCoverage YES -derivedDataPath \"$DERIVED_DATA_PATH\" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES | xcbeautify"

echo "🧪 Running tests"
executeCommand "xcodebuild clean test -project \"PactSwiftMockServer.xcodeproj\" -scheme \"$SCHEME\" -destination \"$TARGET\" -enableCodeCoverage YES -derivedDataPath \"$BUILD_PATH/DerivedData\" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES | xcbeautify"
done

0 comments on commit cc48aea

Please sign in to comment.