Skip to content

Commit 7f14318

Browse files
committed
Merge branch 'dev' into 18-automatic-id-generation
# Conflicts: # test/basics_test.dart # test/box_test.dart # test/test.dart
2 parents e07ee2e + 6e0a6ba commit 7f14318

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.github/workflows/dart.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Dart CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
container:
11+
image: google/dart:latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Install ObjectBox C-API
16+
run: ./install.sh
17+
- name: Install dependencies
18+
run: pub get
19+
- name: Generate ObjectBox models
20+
run: pub run build_runner build
21+
- name: Run tests
22+
run: pub run test

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To try out the demo code in this repository, follow these steps:
3939
1. Install [objectbox-c](https://github.com/objectbox/objectbox-c) system-wide: `bash <(curl -s https://github.com/raw/objectbox/objectbox-c/master/download.sh) 0.7` (answer Y when it asks about installing to /usr/lib).
4040
2. Back in this repository, run `pub get`.
4141
3. Execute `pub run build_runner build`. This regenerates the ObjectBox model to make it usable in Dart (i.e. the file `test/test.g.dart`) and is necessary each time you add or change a class annotated with `@Entity(...)`.
42-
4. Finally run `pub run test test/test.dart` to run the unit tests.
42+
4. Finally run `pub run test` to run the unit tests.
4343

4444
Contribution guide
4545
------------------
@@ -67,7 +67,7 @@ As specified in step 3 of the _Getting started_ section, Dart's _build\_runner_
6767

6868
```dart
6969
import "../lib/objectbox.dart";
70-
part "test.g.dart";
70+
part "basics_test.g.dart";
7171
7272
@Entity(id: 1, uid: 1)
7373
class Note {

install.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
cLibVersion=0.7
5+
os=$(uname)
6+
7+
# if there's no tty this is probably part of a docker build - therefore we install the c-api explicitly
8+
cLibArgs=
9+
if [[ "$os" != MINGW* ]] && [[ "$os" != CYGWIN* ]]; then
10+
tty -s || cLibArgs="${cLibArgs} --install"
11+
fi
12+
13+
bash <(curl -s https://github.com/raw/objectbox/objectbox-c/master/download.sh) ${cLibArgs} ${cLibVersion}

0 commit comments

Comments
 (0)