utils/.github/workflows/crdt-sync-dart-tests.yml
Krzysztof kuhy Rudnicki 922fb36208
Some checks are pending
crdt_sync_dart tests / test (push) Waiting to run
crdt_sync_flutter tests / test (push) Waiting to run
design_system tests / test (push) Waiting to run
file length / file-length (push) Waiting to run
github_device_auth tests / test (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
sync_settings_ui tests / test (push) Waiting to run
crdt_sync_dart: latest stable + exact pins, 100% coverage, CI for both crdt_sync packages
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 12:32:24 +02:00

49 lines
1.4 KiB
YAML

name: crdt_sync_dart tests
on:
push:
branches: [main]
paths: ['crdt_sync_dart/**']
pull_request:
branches: [main]
paths: ['crdt_sync_dart/**']
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: crdt_sync_dart
steps:
- uses: actions/checkout@v4
# Pure Dart, no Flutter dependency -- so setup-dart, not flutter-action.
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Install dependencies
run: dart pub get
- name: Analyze
run: dart analyze --fatal-infos
- name: Run tests with coverage
run: dart test --coverage=coverage
# Unlike `flutter test --coverage`, `dart test --coverage` emits raw VM
# JSON and no lcov. Skipping this step leaves a stale lcov.info on disk
# that the gate below happily "passes" -- which is exactly how this
# package drifted to 96% while believing it was at 100%.
- name: Convert coverage to lcov
run: |
dart pub global activate coverage
dart pub global run coverage:format_coverage \
--lcov --in=coverage/test --out=coverage/lcov.info \
--report-on=lib --packages=.dart_tool/package_config.json
- name: Enforce 100% line coverage
run: scripts/check_coverage.sh coverage/lcov.info 100