mirror of https://github.com/AMT-Cheif/drift.git
119 lines
3.4 KiB
YAML
119 lines
3.4 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
PUB_ENVIRONMENT: bot.github
|
|
|
|
jobs:
|
|
moor:
|
|
name: "moor package"
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
# setup
|
|
- uses: actions/checkout@v2
|
|
- uses: cedx/setup-dart@v2
|
|
with:
|
|
release-channel: beta
|
|
- run: sudo apt-get install -y libsqlite3-dev
|
|
name: Install sqlite3 for tests
|
|
- run: dart pub upgrade
|
|
working-directory: moor
|
|
# analysis
|
|
- run: dart format -o none --set-exit-if-changed moor/
|
|
name: dartfmt
|
|
- run: dart analyze --fatal-infos --fatal-warnings
|
|
working-directory: moor/
|
|
# build, test and upload coverage
|
|
- run: dart run build_runner build --delete-conflicting-outputs
|
|
working-directory: moor
|
|
- run: dart test #-x background_isolate --coverage=coverage
|
|
working-directory: moor
|
|
# - uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: moor-coverage-data
|
|
# path: |
|
|
# moor/coverage/
|
|
# moor/.dart_tool/package_config.json
|
|
# retention-days: 1
|
|
|
|
moor_generator:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
# setup
|
|
- uses: actions/checkout@v2
|
|
- uses: cedx/setup-dart@v2
|
|
with:
|
|
release-channel: beta
|
|
- run: dart pub upgrade
|
|
working-directory: moor_generator
|
|
# analysis
|
|
- run: dart format -o none --set-exit-if-changed moor_generator/
|
|
name: dartfmt
|
|
- run: dart analyze --fatal-infos --fatal-warnings
|
|
working-directory: moor_generator/
|
|
|
|
sqlparser:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
# setup
|
|
- uses: actions/checkout@v2
|
|
- uses: cedx/setup-dart@v2
|
|
with:
|
|
release-channel: beta
|
|
- run: sudo apt-get install -y libsqlite3-dev
|
|
name: Install sqlite3 for tests
|
|
- run: dart pub upgrade
|
|
working-directory: sqlparser
|
|
# analysis
|
|
- run: dart format -o none --set-exit-if-changed sqlparser/
|
|
name: dartfmt
|
|
- run: dart analyze --fatal-infos --fatal-warnings
|
|
working-directory: sqlparser/
|
|
# tests and coverage
|
|
- run: dart test #--coverage=coverage
|
|
working-directory: sqlparser
|
|
# - uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: sqlparser-coverage-data
|
|
# path: |
|
|
# sqlparser/coverage/
|
|
# sqlparser/.dart_tool/package_config.json
|
|
# retention-days: 1
|
|
|
|
misc_integration_tests:
|
|
name: "Integration tests"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: cedx/setup-dart@v2
|
|
with:
|
|
release-channel: beta
|
|
- run: sudo apt-get install -y libsqlite3-dev
|
|
name: Install sqlite3 for tests
|
|
- run: tool/misc_integration_test.sh
|
|
|
|
# upload_coverage:
|
|
# runs-on: ubuntu-20.04
|
|
# needs: [moor, sqlparser]
|
|
# steps:
|
|
# - uses: actions/checkout@v2
|
|
# - uses: cedx/setup-dart@v2
|
|
# - run: dart pub upgrade
|
|
# name: "Setup coverage processor"
|
|
# working-directory: extras/tooling
|
|
# - uses: actions/download-artifact@v2
|
|
# with:
|
|
# name: moor-coverage-data
|
|
# path: moor/
|
|
# - uses: actions/download-artifact@v2
|
|
# with:
|
|
# name: sqlparser-coverage-data
|
|
# path: sqlparser/
|
|
# - run: dart run extras/tooling/bin/coverage.dart
|
|
# name: "Format coverage from raw data"
|
|
# - uses: codecov/codecov-action@v1
|
|
# with:
|
|
# file: lcov.info
|