This commit is contained in:
parent
1d1391d0df
commit
cb5dbeffcf
1 changed files with 25 additions and 8 deletions
|
@ -6,8 +6,15 @@ env:
|
||||||
SONAR_TOKEN: ${{ secrets.SQ_KEY }}
|
SONAR_TOKEN: ${{ secrets.SQ_KEY }}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: flutter-beta
|
runs-on: bookworm
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get upgrade -y
|
||||||
|
apt-get install -y git curl wget
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
|
||||||
|
bash nodesource_setup.sh
|
||||||
|
|
||||||
- name: Initialize scanner
|
- name: Initialize scanner
|
||||||
run: |
|
run: |
|
||||||
export SONAR_SCANNER_VERSION=6.0.0.4432
|
export SONAR_SCANNER_VERSION=6.0.0.4432
|
||||||
|
@ -16,17 +23,26 @@ 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: Set up node because why not
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "lts"
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Set up JDK 17
|
||||||
|
uses: https://github.com/actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
- name: Setup Android SDK
|
||||||
|
uses: https://github.com/android-actions/setup-android@v3
|
||||||
|
|
||||||
|
- name: Install Flutter
|
||||||
run: |
|
run: |
|
||||||
flutter pub get
|
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ vars.FLUTTER_VERSION }}-stable.tar.xz -O flutter.tar.xz
|
||||||
|
tar -xzf flutter.tar.xz -C $HOME/.flutter
|
||||||
|
export PATH=$PATH:$HOME/.flutter
|
||||||
|
rm flutter.tar.xz
|
||||||
|
flutter doctor -v
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -44,6 +60,7 @@ jobs:
|
||||||
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
|
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
|
||||||
flutter doctor -v
|
flutter doctor -v
|
||||||
echo "Running test"
|
echo "Running test"
|
||||||
|
flutter pub get
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue