Skip to content

Commit

Permalink
chore: setup sonar cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardodalarme committed Dec 23, 2024
1 parent bc65ed1 commit 6a44956
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
code-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
Expand All @@ -24,3 +24,36 @@ jobs:
- run: flutter pub run dart_code_metrics:metrics analyze lib

- run: flutter test

sonarqube:
name: SonarQube
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set Up Java
uses: actions/[email protected]
with:
distribution: "oracle"
java-version: "17"

- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true

- name: Install Dependencies
run: flutter pub get

- name: Run Flutter Tests
run: flutter test --coverage

- name: Build
run: flutter build apk

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=ricardodalarme_Nubank-Clone
sonar.organization=ricardodalarme

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=Nubank-Clone
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=./lib/

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit 6a44956

Please sign in to comment.