-
-
Notifications
You must be signed in to change notification settings - Fork 244
Description
Hello there,
I am trying to set up the GitHub Action pipeline to check our codebase through flutter test with coverage and flutter analyze.
Within the Workflow I want to use SonarQube. I have installed the SonarQube Flutter Plugin.
My yml file looks like the following:
sonar-scanner:
needs: [ flutter-analysis ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Download Test Results
uses: actions/download-artifact@v4
with:
name: test-results.json
- name: Download Coverage Results
uses: actions/download-artifact@v4
with:
name: coverage.LCOV
- uses: dart-lang/setup-dart@v1
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@v2.1.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time.
timeout-minutes: 1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
During the SonarQube execution a get an error, saying that command flutter cannot be found:
org.buildobjects.process.StartupException: Could not startup process 'flutter analyze --no-fatal-warnings --no-fatal-infos'.
...
Caused by: java.io.IOException: Cannot run program "flutter" (in directory "/github/workspace"): error=2, No such file or directory
It seems that the command flutter is not installed as it would be installed if I am running the installation on a native server.
My question is, is there anything I can do to make the flutter command available to SonarQube using this action?
Thanks in advance!