-
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 006329b
Showing
4 changed files
with
46 additions
and
26 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 |
---|---|---|
|
@@ -49,13 +49,11 @@ jobs: | |
steps: | ||
- 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] | ||
run: xcodebuild test -scheme "Flare" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./macos.xcresult" | ||
name: ${{ matrix.name }} | ||
path: test_output | ||
|
||
iOS: | ||
name: ${{ matrix.name }} | ||
|
@@ -82,13 +80,11 @@ jobs: | |
- name: Generate project | ||
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] | ||
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./iphonesimulator.xcresult" | ||
name: ${{ matrix.name }} | ||
path: test_output | ||
|
||
tvOS: | ||
name: ${{ matrix.name }} | ||
|
@@ -115,13 +111,11 @@ jobs: | |
- name: Generate project | ||
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] | ||
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./appletvsimulator.xcresult" | ||
name: ${{ matrix.name }} | ||
path: test_output | ||
|
||
watchOS: | ||
name: ${{ matrix.name }} | ||
|
@@ -152,13 +146,11 @@ jobs: | |
- name: Generate project | ||
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] | ||
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan UnitTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: "./watchsimulator.xcresult" | ||
name: ${{ matrix.name }} | ||
path: test_output | ||
|
||
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: macos-13 | ||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: test_output | ||
- run: make merge_test_results | ||
# - run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final.xcresult | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
xcode: true | ||
xcode_archive_path: test_output/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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
files=$(find . -name '*.xcresult') | ||
xcrun xcresulttool merge $files --output-path final.xcresult |