Skip to content

Commit

Permalink
Attempt at reporting test results from Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Oct 9, 2023
1 parent da6f40d commit 9b1ae2b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project GRDB.xcodeproj -scheme GRDB -destination "${{ matrix.destination }}" OTHER_SWIFT_FLAGS='$(inherited) -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK' GCC_PREPROCESSOR_DEFINITIONS='$(inherited) GRDB_SQLITE_ENABLE_PREUPDATE_HOOK=1' clean test
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project GRDB.xcodeproj -scheme GRDB -destination "${{ matrix.destination }}" -resultBundlePath TestResults.xcresult OTHER_SWIFT_FLAGS='$(inherited) -D SQLITE_ENABLE_FTS5 -D SQLITE_ENABLE_PREUPDATE_HOOK' GCC_PREPROCESSOR_DEFINITIONS='$(inherited) GRDB_SQLITE_ENABLE_PREUPDATE_HOOK=1' clean test
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
show-passed-tests: false
upload-bundles: failure
if: success() || failure()
SPM:
name: SPM
runs-on: ${{ matrix.runsOn }}
Expand Down Expand Up @@ -126,6 +132,12 @@ jobs:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: make test_framework_SQLCipher3Encrypted
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
show-passed-tests: false
upload-bundles: failure
if: success() || failure()
SQLCipher4:
name: SQLCipher4
runs-on: ${{ matrix.runsOn }}
Expand All @@ -146,6 +158,12 @@ jobs:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: make test_framework_SQLCipher4Encrypted
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
show-passed-tests: false
upload-bundles: failure
if: success() || failure()
CustomSQLite:
name: CustomSQLite
runs-on: ${{ matrix.runsOn }}
Expand All @@ -166,6 +184,12 @@ jobs:
- uses: actions/checkout@v4
- name: ${{ matrix.name }}
run: make test_framework_GRDBCustomSQLiteOSX
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
show-passed-tests: false
upload-bundles: failure
if: success() || failure()
XCFramework:
name: XCFramework
runs-on: ${{ matrix.runsOn }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ Tests/SPM/Packages

# Test products
Tests/products

# CI
TestResults.xcresult
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ test_CocoaPodsLint: test_CocoaPodsLint_GRDB
test_demo_apps: test_GRDBDemoiOS test_GRDBCombineDemo test_GRDBAsyncDemo

test_framework_GRDBOSX:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDB.xcodeproj \
-scheme GRDB \
-destination "platform=macOS" \
-resultBundlePath TestResults.xcresult \
OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \
GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \
$(TEST_ACTIONS) \
Expand All @@ -93,66 +95,80 @@ test_framework_GRDBOSX:
test_framework_GRDBiOS: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget

test_framework_GRDBiOS_maxTarget:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDB.xcodeproj \
-scheme GRDB \
-destination $(MAX_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \
GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_framework_GRDBiOS_minTarget:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDB.xcodeproj \
-scheme GRDB \
-destination $(MIN_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_framework_GRDBtvOS: test_framework_GRDBtvOS_maxTarget test_framework_GRDBtvOS_minTarget

test_framework_GRDBtvOS_maxTarget:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDB.xcodeproj \
-scheme GRDB \
-destination $(MAX_TVOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
OTHER_SWIFT_FLAGS=$(OTHER_SWIFT_FLAGS) \
GCC_PREPROCESSOR_DEFINITIONS=$(GCC_PREPROCESSOR_DEFINITIONS) \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_framework_GRDBtvOS_minTarget:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDB.xcodeproj \
-scheme GRDB \
-destination $(MIN_TVOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_framework_GRDBCustomSQLiteOSX: SQLiteCustom
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDBCustom.xcodeproj \
-scheme GRDBCustom \
-destination "platform=macOS" \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_framework_GRDBCustomSQLiteiOS: test_framework_GRDBCustomSQLiteiOS_maxTarget test_framework_GRDBCustomSQLiteiOS_minTarget

test_framework_GRDBCustomSQLiteiOS_maxTarget: SQLiteCustom
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDBCustom.xcodeproj \
-scheme GRDBCustom \
-destination $(MAX_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_framework_GRDBCustomSQLiteiOS_minTarget: SQLiteCustom
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project GRDBCustom.xcodeproj \
-scheme GRDBCustom \
-destination $(MIN_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

Expand Down Expand Up @@ -369,26 +385,32 @@ else
endif

test_GRDBDemoiOS:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project Documentation/DemoApps/GRDBDemoiOS/GRDBDemoiOS.xcodeproj \
-scheme GRDBDemoiOS \
-destination $(MAX_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_GRDBCombineDemo:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project Documentation/DemoApps/GRDBCombineDemo/GRDBCombineDemo.xcodeproj \
-scheme GRDBCombineDemo \
-destination $(MAX_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

test_GRDBAsyncDemo:
rm -rf TestResults.xcresult
$(XCODEBUILD) \
-project Documentation/DemoApps/GRDBAsyncDemo/GRDBAsyncDemo.xcodeproj \
-scheme GRDBAsyncDemo \
-destination $(MAX_IOS_DESTINATION) \
-resultBundlePath TestResults.xcresult \
$(TEST_ACTIONS) \
$(XCPRETTY)

Expand Down

0 comments on commit 9b1ae2b

Please sign in to comment.