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