mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Add coveralls step
This commit is contained in:
5
.github/workflows/ci.yaml
vendored
5
.github/workflows/ci.yaml
vendored
@ -35,4 +35,7 @@ jobs:
|
|||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: cp lib/dummy_dsn.dart lib/dsn.dart
|
- run: cp lib/dummy_dsn.dart lib/dsn.dart
|
||||||
- run: flutter analyze
|
- run: flutter analyze
|
||||||
- run: flutter test --coverage
|
- name: Run Unit Tests
|
||||||
|
run: |
|
||||||
|
flutter test --coverage
|
||||||
|
coveralls
|
@ -2,18 +2,14 @@
|
|||||||
* Unit tests for the API class
|
* Unit tests for the API class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
import "package:test/test.dart";
|
||||||
|
import "package:inventree/user_profile.dart";
|
||||||
import 'package:inventree/api.dart';
|
|
||||||
import 'package:inventree/user_profile.dart';
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
setUp(() async {
|
setUp(() async {
|
||||||
// Ensure we have a user profile available
|
// Ensure we have a user profile available
|
||||||
// This profile will match the dockerized InvenTree setup, running locally
|
// This profile will match the dockerized InvenTree setup, running locally
|
||||||
|
|
||||||
print("Creating user profile");
|
|
||||||
await UserProfileDBManager().addProfile(UserProfile(
|
await UserProfileDBManager().addProfile(UserProfile(
|
||||||
username: "testuser",
|
username: "testuser",
|
||||||
password: "testpassword""",
|
password: "testpassword""",
|
||||||
|
Reference in New Issue
Block a user