Skip to content

Commit

Permalink
disable e2e test & enable native tests
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Aug 28, 2023
1 parent 0fd5be0 commit 89b82fb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
66 changes: 32 additions & 34 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: flutter native & integration test
on:
# Currently broken, enable after fixing
# workflow_dispatch
# push:
# branches:
# - main
# - release/**
push:
branches:
- main
- release/**
pull_request:
paths-ignore:
- 'file/**'
Expand Down Expand Up @@ -80,29 +78,29 @@ jobs:
working-directory: ./flutter/example/android
run: flutter build apk --debug

# - name: launch android emulator & run android native test
# uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected]
# with:
# working-directory: ./flutter/example/android
# api-level: 21
# force-avd-creation: false
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# arch: x86_64
# profile: Nexus 6
# script: ./gradlew testDebugUnitTest

# - name: launch android emulator & run android integration test
# uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected]
# with:
# working-directory: ./flutter/example
# api-level: 21
# force-avd-creation: false
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: true
# arch: x86_64
# profile: Nexus 6
# script: flutter test integration_test/integration_test.dart --verbose
- name: launch android emulator & run android native test
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected]
with:
working-directory: ./flutter/example/android
api-level: 21
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
profile: Nexus 6
script: ./gradlew testDebugUnitTest

- name: launch android emulator & run android integration test
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected]
with:
working-directory: ./flutter/example
api-level: 21
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
arch: x86_64
profile: Nexus 6
script: flutter test integration_test/integration_test.dart --verbose

test-ios:
runs-on: macos-13
Expand Down Expand Up @@ -140,11 +138,11 @@ jobs:
echo "SIMULATOR_ID=${simulator_id}" >> "$GITHUB_OUTPUT"
xcrun simctl boot ${simulator_id}
# - name: run ios native test
# working-directory: ./flutter/example/ios
# env:
# SIMULATOR_ID: ${{ steps.sim.outputs.SIMULATOR_ID }}
# run: xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=iOS Simulator,id=$SIMULATOR_ID" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
- name: run ios native test
working-directory: ./flutter/example/ios
env:
SIMULATOR_ID: ${{ steps.sim.outputs.SIMULATOR_ID }}
run: xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=iOS Simulator,id=$SIMULATOR_ID" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO

- name: run ios integration test
run: flutter test integration_test/integration_test.dart --verbose
7 changes: 4 additions & 3 deletions flutter/example/integration_test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import 'package:sentry_flutter_example/main.dart';
import 'package:http/http.dart';

void main() {
const org = 'sentry-sdks';
const slug = 'sentry-flutter';
const authToken = String.fromEnvironment('SENTRY_AUTH_TOKEN');
// const org = 'sentry-sdks';
// const slug = 'sentry-flutter';
// const authToken = String.fromEnvironment('SENTRY_AUTH_TOKEN');
const fakeDsn = 'https://[email protected]/1234567';

TestWidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -141,6 +141,7 @@ void main() {
await transaction.finish();
});

// Disabled until CI issues are fixed
// group('e2e', () {
// var output = find.byKey(const Key('output'));
// late Fixture fixture;
Expand Down

0 comments on commit 89b82fb

Please sign in to comment.