Skip to content

Update publish workflow file #241

Update publish workflow file

Update publish workflow file #241

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call:
jobs:
run-tests:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dart dependencies
run: dart pub get
- name: Analyze package
run: dart analyze lib test example
- name: Verify package formatting
run: dart format --set-exit-if-changed lib test example
- name: Run tests and generate coverage reports
run: |
dart test --reporter=github --coverage=./coverage/reports
dart pub global activate coverage
dart pub global run coverage:format_coverage --report-on=./lib --lcov --in=./coverage/reports --out=coverage/lcov.info
- if: matrix.os == 'ubuntu-latest'
name: Report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/lcov.info
fail_ci_if_error: true