Skip to content

test

test #4

Workflow file for this run

name: Dart CI
on:
push:
branches:
- v3
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
- name: Check formatting
run: dart format --set-exit-if-changed .
lint:
name: Check lints
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
- run: flutter pub get
working-directory: packages/isar
- run: flutter pub get
working-directory: packages/isar_flutter_libs
- run: flutter pub get
working-directory: packages/isar_generator
- run: flutter pub get
working-directory: packages/isar_inspector
- run: |
flutter pub get
flutter pub run build_runner build
dart tool/generate_all_tests.dart
working-directory: packages/isar_test
- name: Lint
run: flutter analyze
test:
name: Dart Test
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- run: echo "$OSTYPE"
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
- name: Prepare Build
uses: ./.github/actions/prepare-build
- name: Build Isar Core
run: sh tool/build.sh
- name: Prepare Tests
run: sh tool/prepare_tests.sh
- name: Run Flutter Unit tests
run: flutter test -j 1
working-directory: packages/isar_test
valgrind:
name: Valgrind
runs-on: ubuntu-latest
if: ${{ false }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
- name: Prepare Build
uses: ./.github/actions/prepare-build
- name: Install valgrind and llvm
run: sudo apt update && sudo apt install -y valgrind libclang-dev
- name: Build Isar Core
run: sh tool/build.sh
- name: Prepare Tests
run: sh tool/prepare_tests.sh
- name: Run Valgrind
run: |
dart compile exe integration_test/all_tests.dart
valgrind \
--leak-check=full \
--error-exitcode=1 \
--show-mismatched-frees=no \
--show-possibly-lost=no \
--errors-for-leak-kinds=definite \
integration_test/all_tests.exe
working-directory: packages/isar_test
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
- name: Prepare Build
uses: ./.github/actions/prepare-build
- name: Build Isar Core
run: sh tool/build.sh
- name: Prepare Tests
run: sh tool/prepare_tests.sh
- name: Add packages
run: |
flutter pub add json_annotation
flutter pub add intl
flutter pub add isar_test --path ../isar_test
working-directory: packages/isar
- name: Collect isar Coverage
run: |
flutter test --coverage --coverage-path lcov_isar.info
working-directory: packages/isar
- name: Collect isar_test Coverage
run: |
flutter test --coverage ../isar_test/test --coverage-path lcov_isar_test.info
working-directory: packages/isar
- name: Upload isar Coverage
uses: codecov/codecov-action@v3
with:
files: packages/isar/lcov_isar.info
- name: Upload isar_test Coverage
uses: codecov/codecov-action@v3
with:
files: packages/isar/lcov_isar_test.info
test_generator:
name: Generator Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.13.9'
- name: Run Generator Unit tests
run: |
dart pub get
dart test
working-directory: packages/isar_generator