-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write a script for merging test results from various platforms
- Loading branch information
1 parent
0154406
commit 60a60bb
Showing
2 changed files
with
31 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,12 +50,10 @@ jobs: | |
- uses: actions/checkout@v3 | ||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "Flare" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "./macos.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./macos.xcresult" | ||
name: macos-coverage | ||
path: ./macos.xcresult | ||
|
||
iOS: | ||
name: ${{ matrix.name }} | ||
|
@@ -83,12 +81,10 @@ jobs: | |
run: make generate | ||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "./iphonesimulator.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./iphonesimulator.xcresult" | ||
name: ios-coverage | ||
path: ./iphonesimulator.xcresult | ||
|
||
tvOS: | ||
name: ${{ matrix.name }} | ||
|
@@ -116,12 +112,10 @@ jobs: | |
run: make generate | ||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "./appletvsimulator.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./appletvsimulator.xcresult" | ||
name: tvos-coverage | ||
path: ./appletvsimulator.xcresult | ||
|
||
watchOS: | ||
name: ${{ matrix.name }} | ||
|
@@ -153,12 +147,10 @@ jobs: | |
run: make generate | ||
- name: ${{ matrix.name }} | ||
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan UnitTests clean -enableCodeCoverage YES -resultBundlePath "./watchsimulator.xcresult" || exit 1 | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./watchsimulator.xcresult" | ||
name: watchos-coverage | ||
path: ./watchsimulator.xcresult | ||
|
||
spm: | ||
name: ${{ matrix.name }} | ||
|
@@ -181,6 +173,23 @@ jobs: | |
- name: ${{ matrix.name }} | ||
run: swift build -c release --target Flare | ||
|
||
upload-to-codecov: | ||
needs: [iOS, macOS, watchOS, tvOS] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
- name: Merge downloaded files | ||
run: ./scripts/merge_test_results.sh | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./final.xcresult" | ||
|
||
# Beta: | ||
# name: ${{ matrix.name }} | ||
# runs-on: firebreak | ||
|
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
files=$(find . -name '*.xcresult') | ||
xcrun xcresulttool merge $files --output-path final.xcresult |