Compare commits

..

1 commit

Author SHA1 Message Date
Matyáš Caras
cb9eed1d7f
Added translation using Weblate (Slovak) 2024-07-17 15:37:59 +00:00
8 changed files with 3 additions and 61 deletions

View file

@ -1,45 +0,0 @@
on:
push:
branches:
- 'dev'
env:
SONAR_TOKEN: ${{ secrets.SQ_KEY }}
jobs:
build:
runs-on: flutter-beta
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: Initialize AVD
run: |
sdkmanager "platform-tools" "platforms;android-${{ vars.ANDROID_API }}"
sdkmanager --install "system-images;android-${apiLevel};${{ vars.ANDROID_TARGET }}${{ vars.ANDROID_ARCH }}"
sdkmanager --update
echo "y" | sdkmanager --licenses
sdkmanager --list
echo "no" | avdmanager -v create avd --force --name "android_emulator" --package "system-images;android-${apiLevel};${target};${arch}" --tag "${target}" --sdcard 128M --device "${{ vars.ANDROID_DEVICE }}"
emulator -avd "android_emulator" -no-audio -no-window -no-snapstorage -no-snapshot -gpu swiftshader_indirect -no-boot-anim -no-accel -wipe-data -skip-adb-auth &
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
flutter doctor -v
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
flutter pub get
- name: Run tests
run: |
flutter test integration_test/app_test.dart --coverage --reporter json > tests.output
- name: Run scanner
run: |
sonar-scanner

View file

@ -6,7 +6,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:logger/logger.dart';
import 'package:path_provider/path_provider.dart';
import 'package:prasule/api/category.dart';
import 'package:prasule/api/entry_data.dart';
import 'package:prasule/api/wallet.dart';
@ -19,10 +18,7 @@ import 'package:prasule/pw/platformfield.dart';
void main() {
final logger = Logger();
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
setUp(() async {
WalletManager.walletPath =
"${(await getApplicationDocumentsDirectory()).path}/wallets";
});
group("Test classes and API", () {
test("Test wallet operations", () async {
expect(

View file

@ -33,6 +33,7 @@ class WalletManager {
for (final w in path
.listSync()
.whereType<File>()
.where((e) => e.path.endsWith(".json"))
.map((e) => e.path.split("/").last)
.toList()) {
try {

View file

@ -23,7 +23,7 @@ class _InitializationScreenState extends State<InitializationScreen> {
void initState() {
super.initState();
getApplicationDocumentsDirectory().then((v) {
WalletManager.walletPath = "${v.path}/wallets";
WalletManager.walletPath = v.path;
if (!mounted) return;
final wallets = WalletManager.listWallets();
if (wallets.isEmpty && mounted) {

View file

@ -1,7 +0,0 @@
sonar.projectKey=prasule
sonar.sources=lib,pubspec.yaml
sonar.tests=test
sonar.dart.analyzer.mode=MANUAL
sonar.dart.analyzer.report.path=
sonar.dart.analyzer.options.override=true
sonar.host.url=https://sq.mnau.xyz

View file

@ -1,3 +0,0 @@
import 'package:integration_test/integration_test_driver.dart';
Future<void> main() => integrationDriver();