ci: use code coverage generation of dart test command #1063
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: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
merge_group: | |
branches: [ main ] | |
jobs: | |
build: | |
name: build (${{ matrix.os }}) | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
# TODO: Remove once https://github.com/dart-lang/sdk/issues/55745 | |
# has been resolved | |
sdk: [stable, 3.3.0] | |
exclude: | |
- os: macos-latest | |
sdk: 3.3.0 | |
- os: ubuntu-latest | |
sdk: 3.3.0 | |
- os: windows-latest | |
sdk: stable | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Install dependencies | |
run: dart pub get | |
- name: Verify formatting | |
run: dart format --output=none --set-exit-if-changed . | |
- name: Analyze project source | |
run: dart analyze | |
- name: Run tests with coverage | |
run: dart test --coverage=coverage | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage | |
name: Upload to codecov.io | |
verbose: true |