-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow tests to be run as integration tests * Adapt flutter driver tests to new structure * Drop flavor_helpers.dart Use copyFile function variable instead, and override runtime in driver tests * Drop lib symlinks in tests Use package imports over ../lib relative imports * Use a group per test file * Remove test symlink as well * Check both dart defined and shell defined env .. to support both flutter drive and dart test * Fix CI * Simplify dartdoc_options.yaml a bit * Switch to integration_test * bump compileSdkVersion to 33 for android integration tests * Disable realm_map_test on Android integration tests (TEST) * Run android flutter tests on ubuntu-latest - faster, cheaper, and more runners * Enable gradle caching * Only drop Decimal128 tests on Android (TEMPORARY) * Re-create platforms * Allow network again for macos * Publish Test Report from flutter integration test * Remember to set org to io.realm when creating platforms projects * Move copyFile * Fix line-length in app_test.dart * default differentiator to 'local' * Add full directories as assets
- Loading branch information
Showing
110 changed files
with
936 additions
and
629 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 |
---|---|---|
|
@@ -321,9 +321,23 @@ jobs: | |
|
||
- name: Run tests on iOS Simulator | ||
run: | | ||
flutter drive --target=test_driver/app.dart --dart-define=testName="" --suppress-analytics --debug | ||
flutter test integration_test/all_tests.dart \ | ||
--dart-define=BAAS_BAASAAS_API_KEY=$BAAS_BAASAAS_API_KEY \ | ||
--dart-define=BAAS_DIFFERENTIATOR=$BAAS_DIFFERENTIATOR \ | ||
--file-reporter=json:test-results.json \ | ||
--suppress-analytics | ||
working-directory: ./flutter/realm_flutter/tests | ||
|
||
- name: Publish Test Report | ||
uses: dorny/[email protected] | ||
if: success() || failure() | ||
with: | ||
name: Test Results Flutter iOS | ||
path: test-results.json | ||
reporter: dart-json | ||
only-summary: true | ||
working-directory: ./flutter/realm_flutter/tests | ||
|
||
cleanup-cluster-flutter-ios: | ||
name: Cleanup Cluster for Flutter iOS | ||
uses: ./.github/workflows/terminate-baas.yml | ||
|
@@ -342,7 +356,7 @@ jobs: | |
differentiator: fa${{ github.run_id }}${{ github.run_attempt }} | ||
|
||
flutter-tests-android: | ||
runs-on: macos-latest | ||
runs-on: ubuntu-latest | ||
name: Flutter Tests Android | ||
timeout-minutes: 45 | ||
needs: | ||
|
@@ -358,6 +372,15 @@ jobs: | |
with: | ||
submodules: 'recursive' | ||
|
||
- name: Enable KVM | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Gradle cache | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
|
@@ -411,7 +434,17 @@ jobs: | |
ndk: 21.0.6113669 | ||
arch: x86 | ||
cmake: 3.10.2.4988404 | ||
script: flutter build apk --debug --target=test_driver/app.dart && flutter install --debug && flutter drive --target=test_driver/app.dart --dart-define=testName="" --suppress-analytics --debug | ||
script: flutter test integration_test/all_tests.dart --dart-define=BAAS_BAASAAS_API_KEY=$BAAS_BAASAAS_API_KEY --dart-define=BAAS_DIFFERENTIATOR=$BAAS_DIFFERENTIATOR --file-reporter=json:test-results.json --suppress-analytics | ||
working-directory: ./flutter/realm_flutter/tests | ||
|
||
- name: Publish Test Report | ||
uses: dorny/[email protected] | ||
if: success() || failure() | ||
with: | ||
name: Test Results Flutter Android | ||
path: test-results.json | ||
reporter: dart-json | ||
only-summary: true | ||
working-directory: ./flutter/realm_flutter/tests | ||
|
||
cleanup-cluster-flutter-android: | ||
|
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 |
---|---|---|
|
@@ -72,5 +72,23 @@ jobs: | |
if: ${{ contains(inputs.os, 'macos') }} | ||
|
||
- name: Run tests | ||
run: ${{ inputs.os == 'linux' && 'xvfb-run' || '' }} flutter drive -d ${{ inputs.os }} --target=test_driver/app.dart --suppress-analytics --dart-entrypoint-args="" --debug # -a="Some test name" | ||
run: | | ||
${{ inputs.os == 'linux' && 'xvfb-run' || '' }} \ | ||
flutter test integration_test/all_tests.dart \ | ||
--dart-define=BAAS_BAASAAS_API_KEY=$BAAS_BAASAAS_API_KEY \ | ||
--dart-define=BAAS_DIFFERENTIATOR=$BAAS_DIFFERENTIATOR \ | ||
--device-id=${{ inputs.os }} \ | ||
--file-reporter=json:test-results.json \ | ||
--suppress-analytics | ||
shell: bash | ||
working-directory: ./flutter/realm_flutter/tests | ||
|
||
- name: Publish Test Report | ||
uses: dorny/[email protected] | ||
if: success() || failure() | ||
with: | ||
name: Test Results Flutter ${{ inputs.os }} ${{ inputs.architecture }} | ||
path: test-results.json | ||
reporter: dart-json | ||
only-summary: true | ||
working-directory: ./flutter/realm_flutter/tests |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
6 changes: 3 additions & 3 deletions
6
flutter/realm_flutter/tests/android/app/src/debug/AndroidManifest.xml
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
6 changes: 0 additions & 6 deletions
6
flutter/realm_flutter/tests/android/app/src/main/java/io/tests/MainActivity.java
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
flutter/realm_flutter/tests/android/app/src/main/kotlin/io/realm/tests/MainActivity.kt
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,6 @@ | ||
package io.realm.tests | ||
|
||
import io.flutter.embedding.android.FlutterActivity | ||
|
||
class MainActivity: FlutterActivity() { | ||
} |
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
6 changes: 3 additions & 3 deletions
6
flutter/realm_flutter/tests/android/app/src/profile/AndroidManifest.xml
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx1536M | ||
org.gradle.jvmargs=-Xmx4G | ||
android.useAndroidX=true | ||
android.enableJetifier=true | ||
android.native.buildOutput=verbose |
Oops, something went wrong.