This commit is contained in:
parent
ba3b963d84
commit
32432d760c
2 changed files with 15 additions and 13 deletions
|
@ -16,18 +16,7 @@ jobs:
|
||||||
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
||||||
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
||||||
export SONAR_SCANNER_OPTS="-server"
|
export SONAR_SCANNER_OPTS="-server"
|
||||||
|
|
||||||
- name: Initialize AVD
|
|
||||||
run: |
|
|
||||||
sdkmanager "platform-tools" "platforms;android-${{ vars.ANDROID_API }}"
|
|
||||||
sdkmanager --install "system-images;android-${{ vars.ANDROID_API }};${{ vars.ANDROID_TARGET }};${{ vars.ANDROID_ARCH }}"
|
|
||||||
sdkmanager --update
|
|
||||||
echo "y" | sdkmanager --licenses
|
|
||||||
sdkmanager --list
|
|
||||||
echo "no" | avdmanager -v create avd --force --name "android_emulator" --package "system-images;android-${{ vars.ANDROID_API }};${{vars.ANDROID_TARGET}};${{ vars.ANDROID_ARCH }}" --tag "${{vars.ANRDOID_TARGET}}" --sdcard 128M --device "${{ vars.ANDROID_DEVICE }}"
|
|
||||||
emulator -avd "android_emulator" -no-audio -no-window -no-snapstorage -no-snapshot -gpu swiftshader_indirect -no-boot-anim -no-accel -wipe-data -skip-adb-auth &
|
|
||||||
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
|
|
||||||
flutter doctor -v
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -38,6 +27,20 @@ jobs:
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
|
echo "Downloading tools"
|
||||||
|
sdkmanager "platform-tools" "platforms;android-${{ vars.ANDROID_API }}"
|
||||||
|
sdkmanager --install "system-images;android-${{ vars.ANDROID_API }};${{ vars.ANDROID_TARGET }};${{ vars.ANDROID_ARCH }}"
|
||||||
|
sdkmanager --update
|
||||||
|
echo "y" | sdkmanager --licenses
|
||||||
|
sdkmanager --list
|
||||||
|
echo "Creating AVD"
|
||||||
|
echo "no" | avdmanager -v create avd --force --name "android_emulator" --package "system-images;android-${{ vars.ANDROID_API }};${{vars.ANDROID_TARGET}};${{ vars.ANDROID_ARCH }}" --tag "${{vars.ANRDOID_TARGET}}" --sdcard 128M --device "${{ vars.ANDROID_DEVICE }}"
|
||||||
|
echo "Starting AVD"
|
||||||
|
emulator -avd "android_emulator" -no-audio -no-window -no-snapstorage -no-snapshot -gpu swiftshader_indirect -no-boot-anim -no-accel -wipe-data -skip-adb-auth &
|
||||||
|
echo "Wait-for AVD"
|
||||||
|
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
|
||||||
|
flutter doctor -v
|
||||||
|
echo "Running test"
|
||||||
flutter test integration_test/app_test.dart --coverage --reporter json > tests.output
|
flutter test integration_test/app_test.dart --coverage --reporter json > tests.output
|
||||||
|
|
||||||
- name: Run scanner
|
- name: Run scanner
|
||||||
|
|
|
@ -2,6 +2,5 @@ sonar.projectKey=prasule
|
||||||
sonar.sources=lib,pubspec.yaml
|
sonar.sources=lib,pubspec.yaml
|
||||||
sonar.tests=test
|
sonar.tests=test
|
||||||
sonar.dart.analyzer.mode=MANUAL
|
sonar.dart.analyzer.mode=MANUAL
|
||||||
sonar.dart.analyzer.report.path=
|
|
||||||
sonar.dart.analyzer.options.override=true
|
sonar.dart.analyzer.options.override=true
|
||||||
sonar.host.url=https://sq.mnau.xyz
|
sonar.host.url=https://sq.mnau.xyz
|
Loading…
Reference in a new issue