Update macOS project #354
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: PactSwift - Consumer | |
on: [push, workflow_dispatch, repository_dispatch] | |
jobs: | |
test_iOS_SPM: | |
name: iOS SPM - AnimalClient | |
runs-on: macOS-13 | |
env: | |
PACTFLOW_TOKEN: ${{ secrets.PACTFLOW_TOKEN }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Prepare the tools | |
run: | | |
brew tap thii/xcbeautify https://github.com/thii/xcbeautify.git | |
brew install xcbeautify | |
- name: Run tests | |
run: | | |
cd Pact-iOS-SPM-Example | |
set -o pipefail && xcodebuild test -project AnimalClient.xcodeproj -scheme AnimalClient -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcbeautify | |
test_iOS_SPM_ObjC: | |
name: iOS (Obj-C) SPM | |
runs-on: macOS-13 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use Xcode 14.3.1 | |
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app | |
- name: Prepare the tools | |
run: | | |
brew tap thii/xcbeautify https://github.com/thii/xcbeautify.git | |
brew install xcbeautify | |
- name: Run tests | |
run: | | |
cd Pact-iOS-ObjC-Example | |
set -o pipefail && xcodebuild clean test -project Pact-iOS-ObjC-Example.xcodeproj -scheme Pact-iOS-ObjC-Example -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcbeautify | |
test_macOS_SPM: | |
name: macOS SPM | |
runs-on: macOS-13 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Use Xcode 14.3.1 | |
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app | |
- name: Prepare the tools | |
run: | | |
brew tap thii/xcbeautify https://github.com/thii/xcbeautify.git | |
brew install xcbeautify | |
- name: Run tests | |
run: | | |
cd Pact-macOS-SPM-Example | |
set -o pipefail && xcodebuild test -project Pact-macOS-SPM-Example.xcodeproj -scheme Pact-macOS-SPM-Example -destination "platform=macOS,arch=x86_64" | xcbeautify | |
test_ubuntu: | |
name: Ubuntu Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: fwal/setup-swift@v1 | |
- name: Get swift version | |
run: swift --version | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Cache Rust libs | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-rust-libs-pactswift-linux | |
with: | |
path: pact-foundation/rust/target/release | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Pact-Linux/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Build Run Test | |
run: | | |
cd Pact-Linux-Consumer | |
Support/build_test |