-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: add account repository test * fix: register json data * chore: add synchronized package * build: disable sonar * chore: storage package erase * fix: GetStorage test * test: add account test * fix: flutter analyze issues * feat: IMPORTANT feat... add AppLocalStorage management. removed get_storage, path_provider, synchronized and fake_async * build: sonarcloud integration
- Loading branch information
Showing
3 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Flutter | ||
uses: subosito/[email protected] | ||
with: | ||
|
@@ -29,6 +30,7 @@ jobs: | |
uses: dart-lang/[email protected] | ||
with: | ||
dart-version: 3.5.4 | ||
|
||
- name: Setup Java JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
|
@@ -38,6 +40,7 @@ jobs: | |
run: echo "JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64" >> $GITHUB_ENV | ||
- name: flutter jdk configuration | ||
run: flutter config --jdk-dir /usr/lib/jvm/temurin-17-jdk-amd64 | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
- name: Analyze | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,24 +3,57 @@ on: | |
push: | ||
branches: | ||
- sonar | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- sonar | ||
- main | ||
types: [ opened, synchronize, reopened ] | ||
jobs: | ||
build: | ||
name: Build and analyze | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/cirruslabs/flutter:stable | ||
image: ghcr.io/cirruslabs/flutter:3.24.4 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
# - name: Setup Flutter | ||
# uses: subosito/[email protected] | ||
# with: | ||
# flutter-version: 3.24.4 | ||
# channel: stable | ||
# - name: Setup Dart | ||
# uses: dart-lang/[email protected] | ||
# with: | ||
# dart-version: 3.5.4 | ||
|
||
# - name: Setup Java JDK 17 | ||
# uses: actions/setup-java@v4 | ||
# with: | ||
# distribution: 'temurin' | ||
# java-version: '17' | ||
# - name: set JAVA_HOME | ||
# run: echo "JAVA_HOME=/usr/lib/jvm/temurin-17-jdk-amd64" >> $GITHUB_ENV | ||
# - name: flutter jdk configuration | ||
# run: flutter config --jdk-dir /usr/lib/jvm/temurin-17-jdk-amd64 | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
- name: Analyze | ||
run: flutter analyze | ||
- name: Run tests | ||
run: flutter test --coverage | ||
|
||
- name: Cache SonarQube Cloud packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Build | ||
run: flutter build apk --release --target lib/main/main_prod.dart | ||
- name: Download sonar-scanner | ||
|
@@ -29,9 +62,11 @@ jobs: | |
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ | ||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: | | ||
$HOME/.sonar/sonar-scanner-6.2.1.4610-linux-x64/bin/sonar-scanner \ | ||
-Dsonar.projectKey=cevheri_flutter-bloc-advanced \ | ||
-Dsonar.organization=cevheri-open-source | ||
-Dsonar.organization=cevheri-open-source \ | ||
-Dsonar.sources=. \ | ||
-Dsonar.host.url=https://sonarcloud.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This is the name and version displayed in the SonarCloud UI. | ||
sonar.projectKey=cevheri_flutter-bloc-advanced | ||
sonar.organization=cevheri-open-source | ||
sonar.host.url=https://sonarcloud.io | ||
|
||
|
||
sonar.projectName=flutter-template | ||
sonar.projectVersion=1.0 | ||
|
||
|
||
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. | ||
#sonar.sources=lib/ | ||
sonar.exclusions=**/test/** | ||
#sonar.test.exclusions=test/** | ||
sonar.tests=test/ | ||
#sonar.verbose=true | ||
|
||
# Encoding of the source code. Default is default system encoding | ||
#sonar.sourceEncoding=UTF-8 | ||
|
||
sonar.c.file.suffixes=- | ||
sonar.cpp.file.suffixes=- | ||
sonar.objc.file.suffixes=- | ||
|
||
|
||
|
||
sonar.dart.lcov.reportPaths=coverage/lcov.info |