Skip to content

Dart CI

Dart CI #360

Workflow file for this run

name: Dart CI
on:
push:
branches: [ master ]
paths-ignore: [ '**.md' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md' ]
schedule:
# Runs at 02:00 UTC on the 1, 4, 7, 10, 13, 16, 19, 22, 25, 28 and 31st of every month.
- cron: "0 2 */3 * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
sdk: [ beta, stable, 2.15.0, 2.12.0 ]
steps:
- uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart version
run: dart --version
- name: Install dependencies
run: dart pub get
- name: Analyze
if: ${{ matrix.sdk == 'stable' }}
run: dart analyze --fatal-infos --fatal-warnings
- name: Format code
if: ${{ matrix.sdk == 'stable' }}
run: dart format . --set-exit-if-changed
- name: Active coverage
run: dart pub global activate coverage
- name: Run tests
run: dart pub run test test/rx_storage_test.dart --chain-stack-traces
- name: Start Observatory
run: dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit --enable-asserts test/rx_storage_test.dart &
- name: Collect coverage
run: nohup dart pub global run coverage:collect_coverage --port=8111 --out=coverage.json --wait-paused --resume-isolates
- name: Format coverage
run: dart pub global run coverage:format_coverage --lcov --in=coverage.json --out=lcov.info --report-on=lib
- uses: codecov/[email protected]
with:
fail_ci_if_error: false