Merge pull request #43 from persian-tools/renovate/codecov-codecov-ac… #111
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: "Test" | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
sdk: [2.14.0] | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Setup Dart SKD , v2.14.0 | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Install dependencies | |
run: pub get | |
- name: Run tests | |
run: dart test . | |
- name: Install coverage | |
run: pub global activate coverage | |
- name: Format json files to lcov | |
run: pub global run coverage:format_coverage -l --packages=.test -i coverage/test/ -o coverage/coverage.lcov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage/coverage.lcov |