Reverted test plan #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Xcode - Build and Test | |
on: [push] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Select Xcode version | |
run: | | |
ls /Applications | |
sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer | |
xcode-select -p | |
- name: Install the Apple certificate | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_P12 }} | |
P12_PASSWORD: ${{ secrets.PASSWORD_P12 }} | |
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
run: | | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate and provisioning profile from secrets | |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 -d -o $CERTIFICATE_PATH | |
# create temporary keychain | |
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
- name: Build | |
run: | | |
xcodebuild build analyze -scheme OlaTagger -destination platform=macOS -showBuildTimingSummary | xcpretty && exit ${PIPESTATUS[0]} | |
- name: Test | |
run: | | |
xcodebuild test -scheme OlaTagger -destination platform=macOS | xcpretty && exit ${PIPESTATUS[0]} |