diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a55ab233..e0f15a51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ env: jobs: moor: name: "moor package" - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: # setup @@ -29,15 +29,16 @@ jobs: # build, test and upload coverage - run: dart run build_runner build --delete-conflicting-outputs working-directory: moor - - run: dart --no-sound-null-safety test --coverage=coverage + - run: dart --no-sound-null-safety test --coverage=coverage -x background_isolate working-directory: moor - uses: actions/upload-artifact@v2 with: name: moor-coverage-data path: moor/coverage/ + retention-days: 1 moor_generator: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: # setup - uses: actions/checkout@v2 @@ -53,7 +54,7 @@ jobs: working-directory: moor_generator/ sqlparser: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: # setup - uses: actions/checkout@v2 @@ -74,10 +75,11 @@ jobs: with: name: sqlparser-coverage-data path: sqlparser/coverage + retention-days: 1 misc_integration_tests: name: "Integration tests" - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: cedx/setup-dart@v2 @@ -88,7 +90,7 @@ jobs: - run: tool/misc_integration_test.sh upload_coverage: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 needs: [moor, sqlparser] steps: - uses: actions/checkout@v2 @@ -96,6 +98,14 @@ jobs: - run: dart pub upgrade name: "Setup coverage processor" working-directory: extras/coverage_formatting + - uses: actions/download-artifact@v2 + with: + name: moor-coverage-data + path: moor/coverage/ + - uses: actions/download-artifact@v2 + with: + name: sqlparser-coverage-data + path: sqlparser/coverage/ - run: dart run extras/coverage_formatting/bin/coverage.dart name: "Format coverage from raw data" - uses: codecov/codecov-action@v1 diff --git a/moor/dart_test.yaml b/moor/dart_test.yaml index 02c6febb..c11d0b9e 100644 --- a/moor/dart_test.yaml +++ b/moor/dart_test.yaml @@ -1,5 +1,6 @@ tags: integration: + background_isolate: platforms: - vm diff --git a/moor/test/isolate_test.dart b/moor/test/isolate_test.dart index a9316742..ce2d5718 100644 --- a/moor/test/isolate_test.dart +++ b/moor/test/isolate_test.dart @@ -28,7 +28,7 @@ void main() { } _runTests(spawnBackground, true); - }); + }, tags: 'background_isolate'); test('stream queries across isolates', () async { // three isolates: @@ -59,7 +59,7 @@ void main() { writer.kill(); await expectation; await moorIsolate.shutdownAll(); - }); + }, tags: 'background_isolate'); test('errors propagate across isolates', () async { final isolate = await MoorIsolate.spawn(_backgroundConnection); @@ -78,7 +78,7 @@ void main() { await db.close(); await isolate.shutdownAll(); - }); + }, tags: 'background_isolate'); } void _runTests(