Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
4seer authored Mar 14, 2020
2 parents 8d86bc0 + 005fe99 commit 22ce531
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Dart CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

test:
#The type of machine to run the job on. [windows,macos, ubuntu , self-hosted]
runs-on: macos-latest
#sequence of tasks called
steps:
# The branch or tag ref that triggered the workflow will be checked out.
# https://github.com/actions/checkout
- uses: actions/checkout@v1
# Setup a flutter environment.
# https://github.com/marketplace/actions/flutter-action
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.15.18'
channel: 'dev'
- run: flutter pub get
- name: Static analysis
run: flutter analyze
# - name: Running tests
# We can run SQLite tests only on real device
# run: flutter run -t test/tests.dart
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,30 @@ Functionality description and discussion

[E-commerce App Mobile App Local Database Structure](https://medium.com/@openflutterproject/open-flutter-project-e-commerce-app-local-database-4744b61264c7)

## Flutter Version

You may need to update flutter to dev or beta for the most recent updates to work. Use following commands to upgrade flutter:

```
flutter channel dev
flutter upgrade
```
or

```
flutter channel beta
flutter upgrade
```

## Tests
To run tests use command below:

```
flutter run -t test/test.dart
```


## IDE settings
You need to update the configuration of your IDE to tell the location of the entry point.

The example for VS Code is below:
Expand Down
6 changes: 5 additions & 1 deletion lib/domain/entities/entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ abstract class Entity<TKey> extends Equatable {

Entity(this.id);

Map<String, dynamic> toMap();
Map<String, dynamic> toMap() {
return {
'id': id
};
}

@override
List<Object> get props => [];
Expand Down
5 changes: 3 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ dependencies:
bubble_tab_indicator: any
dartz: ^0.8.9
rxdart: ^0.23.1
pedantic: ^1.9.0
sqflite:
path:

dev_dependencies:
flutter_test:
sdk: flutter
# pedantic: 1.8.0+1

dependency_overrides:
pedantic: ^1.9.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
2 changes: 1 addition & 1 deletion test/data/local/user/user_data_source_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void main() {

await dataSource.update(dataToUpdate);

UserEntity updatedData = await dataSource.get(dataToUpdate.id);
var updatedData = await dataSource.get(dataToUpdate.id);
expect(dataToUpdate == updatedData, true);
});

Expand Down

0 comments on commit 22ce531

Please sign in to comment.