- chore: explicitly allow dart 3. #164
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Dart | |
on: | |
push: | |
branches: | |
- master | |
- gha | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: dio_cache_interceptor | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Install dependencies | |
run: dart pub get | |
# verify the use of 'dart format' on each commit. | |
- name: Verify formatting | |
run: dart format --output=none --set-exit-if-changed . | |
# Consider passing '--fatal-infos' for slightly stricter analysis. | |
- name: Analyze project source | |
run: dart analyze | |
- name: Activate coverage | |
run: | | |
dart pub global activate coverage | |
- name: Run tests with coverage | |
run: | | |
dart pub global run coverage:test_with_coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
files: dio_cache_interceptor/coverage/lcov.info | |
# Run store tests. | |
- name: Run tests with coverage on DB Store | |
working-directory: dio_cache_interceptor_db_store | |
run: | | |
dart pub get | |
dart pub global run coverage:test_with_coverage | |
- name: Run tests with coverage on File Store | |
working-directory: dio_cache_interceptor_file_store | |
run: | | |
dart pub get | |
dart pub global run coverage:test_with_coverage | |
- name: Run tests with coverage on Hive Store | |
working-directory: dio_cache_interceptor_hive_store | |
run: | | |
dart pub get | |
dart pub global run coverage:test_with_coverage |