-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
115 additions
and
198 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,86 @@ | ||
name: Build PR | ||
name: Build Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
RUST_TARGET_PATH: pact-reference | ||
- '!main' | ||
|
||
jobs: | ||
test: | ||
name: Run ${{ matrix.platform }} on ${{ matrix.host }} | ||
runs-on: ${{ matrix.host }} | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
host: [macos-12, macos-13] | ||
platform: [ios, macos] | ||
include: | ||
- platform: ios | ||
scheme: "PactSwift-iOS" | ||
destination: "platform=iOS Simulator,name=iPhone 14 Pro" | ||
- platform: macos | ||
scheme: "PactSwift-macOS" | ||
destination: "arch=x86_64" | ||
test_macos: | ||
name: "🤖 Test macOS" | ||
runs-on: macos-13 | ||
|
||
env: | ||
SCHEME: ${{ matrix.scheme }} | ||
DESTINATION: ${{ matrix.destination }} | ||
XCODE_VERSION: 14.3.1 | ||
|
||
concurrency: | ||
group: test_macos13_darwin_$SCHEME_${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: "🧑💻 Checkout repository" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "⚙️ Use Xcode ${{ env.XCODE_VERSION }}" | ||
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app | ||
|
||
- name: Prepare Tools | ||
- name: "🧰 Prepare tools" | ||
run: | | ||
Scripts/prepare_build_tools | ||
- name: Run tests (Xcode) | ||
- name: "🧪 xcodebuild clean test" | ||
run: | | ||
set -o pipefail && xcodebuild clean test -project PactSwift.xcodeproj -scheme "$SCHEME" -destination "$DESTINATION" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcbeautify | ||
set -o pipefail && xcodebuild -resolvePackageDependencies | xcbeautify && xcodebuild clean test -project PactSwift.xcodeproj -scheme "PactSwift-macOS" -destination "arch=x86_64" | xcbeautify | ||
- name: Run tests (CLI - Swift Package) | ||
- name: "⚗️ swift test" | ||
run: | | ||
set -o pipefail && swift test -c release | ||
test_ios: | ||
name: "🤖 Test iOS" | ||
runs-on: macos-13 | ||
needs: [test_macos] | ||
|
||
env: | ||
SCHEME: "PactSwift-iOS" | ||
DESTINATION: "platform=iOS Simulator,name=iPhone 14 Pro" | ||
XCODE_VERSION: 14.3.1 | ||
|
||
concurrency: | ||
group: test_macos13_ios_$SCHEME_${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: "🧑💻 Checkout repository" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "⚙️ Use Xcode ${{ env.XCODE_VERSION }}" | ||
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app | ||
|
||
- name: "🧰 Prepare tools" | ||
run: | | ||
Scripts/prepare_build_tools | ||
- name: "♘ Test for Carthage" | ||
run: | | ||
set -o pipefail && carthage build --no-skip-current --use-xcframeworks | ||
- name: "🧪 xcodebuild clean test" | ||
run: | | ||
set -o pipefail && xcodebuild -resolvePackageDependencies | xcbeautify && xcodebuild clean test -project PactSwift.xcodeproj -scheme "PactSwift-iOS" -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcbeautify | ||
- name: "⚗️ swift test" | ||
run: | | ||
swift build | ||
swift test -c release | ||
after_success: | ||
needs: [test_ios] | ||
name: "🚚 Build demo projects" | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "🚚 Build demo projects" | ||
run: | | ||
curl -X POST https://api.github.com/repos/surpher/pact-swift-examples/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -u ${{ secrets.PACT_SWIFT_TOKEN }} --data '{"event_type":"PactSwift - ${{ github.event.head_commit.message }}"}' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "pactswiftserver", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/surpher/PactSwiftServer.git", | ||
"state" : { | ||
"revision" : "a122b04c7ba2f420f256b0657e67ff97ce933279", | ||
"version" : "0.4.7" | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "PactSwiftMockServer", | ||
"repositoryURL": "https://github.com/surpher/PactSwiftServer.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "12ecc92092ecd3640dcc2dcb98ce6b3d1f2d76f7", | ||
"version": "0.4.7" | ||
} | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
] | ||
}, | ||
"version": 1 | ||
} |
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
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
Oops, something went wrong.