prasule/.forgejo/workflows/sq_analyze.yml

35 lines
1.1 KiB
YAML
Raw Normal View History

2024-07-17 20:11:44 +02:00
on:
push:
branches:
- 'dev'
env:
SONAR_TOKEN: ${{ secrets.SQ_KEY }}
jobs:
build:
2024-07-17 20:56:53 +02:00
runs-on: node22
2024-07-17 20:11:44 +02:00
steps:
- name: Initialize scanner
run: |
export SONAR_SCANNER_VERSION=6.0.0.4432
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
export SONAR_SCANNER_OPTS="-server"
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
flutter pub get
- name: Run tests
2024-07-17 20:51:24 +02:00
uses: https://github.com/ReactiveCircus/android-emulator-runner@v2
with:
api-level: ${{ vars.ANDROID_API }}
script: flutter test integration_test/app_test.dart --coverage --reporter json > tests.output
2024-07-17 20:11:44 +02:00
- name: Run scanner
run: |
sonar-scanner