fix: CI
This commit is contained in:
parent
74bd1d331b
commit
4d62a79e96
|
@ -11,16 +11,19 @@ coverage:
|
||||||
dependencies: []
|
dependencies: []
|
||||||
script:
|
script:
|
||||||
- apt update
|
- apt update
|
||||||
- apt install -y curl gnupg2 git
|
- apt install -y curl gnupg2 git unzip
|
||||||
- curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
- git clone https://github.com/flutter/flutter.git -b stable
|
||||||
- curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
|
- export PATH="$PATH:`pwd`/flutter/bin"
|
||||||
|
- sed -i s/#//g pubspec.yaml
|
||||||
|
- flutter doctor
|
||||||
- apt update
|
- apt update
|
||||||
- apt install -y dart chromium lcov libolm3 sqlite3 libsqlite3-dev
|
- apt install -y chromium lcov libolm3 sqlite3 libsqlite3-dev
|
||||||
- ln -s /usr/lib/dart/bin/pub /usr/bin/
|
- ln -s /usr/lib/dart/bin/pub /usr/bin/
|
||||||
- useradd -m test
|
- useradd -m test
|
||||||
- chown -R 'test:' '.'
|
- chown -R 'test:' '.'
|
||||||
- chmod +x ./prepare.sh
|
- chmod +x ./prepare.sh
|
||||||
- chmod +x ./test.sh
|
- chmod +x ./test.sh
|
||||||
|
- rm -r example
|
||||||
- su -c ./prepare.sh test
|
- su -c ./prepare.sh test
|
||||||
- su -c ./test.sh test
|
- su -c ./test.sh test
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@ -125,4 +128,4 @@ pages:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
|
|
@ -20,4 +20,8 @@ cmake --build .
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pub get
|
if which flutter >/dev/null; then
|
||||||
|
flutter pub get
|
||||||
|
else
|
||||||
|
pub get
|
||||||
|
fi
|
||||||
|
|
|
@ -30,8 +30,5 @@ dev_dependencies:
|
||||||
moor_generator: ^3.0.0
|
moor_generator: ^3.0.0
|
||||||
build_runner: ^1.5.2
|
build_runner: ^1.5.2
|
||||||
pedantic: ^1.9.0
|
pedantic: ^1.9.0
|
||||||
moor_ffi: ^0.5.0
|
#flutter_test:
|
||||||
|
# sdk: flutter
|
||||||
dependency_overrides:
|
|
||||||
# See https://github.com/flutter/flutter/issues/62240
|
|
||||||
analyzer: '0.39.14'
|
|
||||||
|
|
6
test.sh
6
test.sh
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# pub run test -p vm
|
# pub run test -p vm
|
||||||
pub run test_coverage --print-test-output
|
flutter test --coverage
|
||||||
pub global activate remove_from_coverage
|
flutter pub global activate remove_from_coverage
|
||||||
pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$'
|
flutter pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$'
|
||||||
genhtml -o coverage coverage/lcov.info || true
|
genhtml -o coverage coverage/lcov.info || true
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
import 'package:famedlysdk/famedlysdk.dart';
|
import 'package:famedlysdk/famedlysdk.dart';
|
||||||
import 'package:moor/moor.dart';
|
import 'package:moor/moor.dart';
|
||||||
import 'package:moor_ffi/moor_ffi.dart' as moor;
|
import 'package:moor/ffi.dart' as moor;
|
||||||
|
|
||||||
Database getDatabase() {
|
Database getDatabase() {
|
||||||
moorRuntimeOptions.dontWarnAboutMultipleDatabases = true;
|
moorRuntimeOptions.dontWarnAboutMultipleDatabases = true;
|
||||||
|
|
Loading…
Reference in a new issue