build: use melos #557
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dart CI | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: [ '**.md', 'examples/**' ] | |
pull_request: | |
branches: [ master ] | |
paths-ignore: [ '**.md', 'examples/**' ] | |
schedule: | |
# Runs at 00:00 UTC on the 1, 8, 15, 22 and 29th of every month. | |
- cron: '0 0 */7 * *' | |
workflow_dispatch: | |
jobs: | |
analyze-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
sdk: [ beta, stable, 2.17.0, 2.15.0, 2.12.0 ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Dart | |
uses: dart-lang/[email protected] | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Install melos | |
run: dart pub global activate melos | |
- name: Melos Boostrap | |
run: melos bootstrap | |
- name: Print Dart version | |
run: dart --version | |
- name: Install dependencies | |
run: melos run pub-get-no-private | |
- name: Analyze | |
if: ${{ matrix.sdk == 'stable' }} | |
run: melos run analyze-no-private | |
- name: Format code | |
if: ${{ matrix.sdk == 'stable' }} | |
run: melos run format-no-private | |
- name: Active coverage | |
run: dart pub global activate coverage | |
- name: Run tests | |
run: melos run test-rxdart | |
- name: Start Observatory | |
run: dart | |
--disable-service-auth-codes | |
--enable-vm-service=8111 | |
--pause-isolates-on-exit | |
--enable-asserts | |
test/rxdart_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] |