Skip to content

chore: Generate coverage reports and upload them. #49

chore: Generate coverage reports and upload them.

chore: Generate coverage reports and upload them. #49

name: yet_another_json_isolate
on:
push:
branches:
- main
paths:
- 'packages/yet_another_json_isolate/**'
- '.github/workflows/yet_another_json_isolate.yml'
pull_request:
paths:
- 'packages/yet_another_json_isolate/**'
- '.github/workflows/yet_another_json_isolate.yml'
jobs:
test:
name: Test SDK ${{ matrix.sdk }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [stable, beta, dev]
defaults:
run:
working-directory: packages/yet_another_json_isolate
runs-on: ${{ matrix.os }}
steps:
- name: Checks-out repo
uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Bootstrap workspace
run: |
cd ../../
dart pub global activate melos
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
run: dart format lib test -l 80 --set-exit-if-changed
- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .
- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze
- name: Run tests
run: dart test --coverage=./coverage
- name: Format coverage
run: |
dart pub global activate coverage
dart pub global run coverage:format_coverage --lcov --in="./coverage/test" --out="./coverage/lcov.info" --report-on="./lib"
- name: Upload coverage results to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/yet_another_json_isolate/coverage/lcov.info