Skip to content

fix: sonar-scanner rinstall #4

fix: sonar-scanner rinstall

fix: sonar-scanner rinstall #4

Workflow file for this run

name: Sonar Flutter Example
on:
push:
branches:
- main
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/[email protected]
- name: Get Flutter Version From FVM config
id: get_flutter_version
run: echo "::set-output name=version::$(cat .fvm/fvm_config.json | jq -r '.flutterSdkVersion')"
- name: 🐦 Setup Flutter
uses: subosito/[email protected]
with:
flutter-version: ${{ steps.get_flutter_version.outputs.version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 📦 Install Dependencies
run: flutter pub get
- name: 🧪 Run Tests
run: flutter test --machine --coverage > tests.output
- name: 🪲 Run Sonar
run: |
sudo apt-get install -y openjdk-11-jdk
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.1.0.4477-linux-x64.zip
unzip sonar-scanner-cli-6.1.0.4477-linux-x64.zip
./sonar-scanner-6.1.0.4477-linux/binsonar-scanner \
-Dsonar.token=${{secrets.SONAR_TOKEN}} \
-Dsonar.host.url=${{secrets.SONAR_HOST_URL}}