.gitignore #31
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: Dart CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dart-lang/setup-dart@v1 | |
- name: Dart version | |
run: | | |
dart --version | |
uname -a | |
- name: Install dependencies | |
run: dart pub get | |
- name: dart format | |
run: dart format -o none --set-exit-if-changed . | |
- name: dart analyze | |
run: dart analyze --fatal-infos --fatal-warnings . | |
- name: dependency_validator | |
run: dart run dependency_validator | |
- name: Run tests (VM) | |
run: dart test --platform vm | |
- name: Run tests (Chrome) | |
run: dart test --platform chrome | |
- name: dart doc | |
run: dart doc --dry-run | |
- name: Generate coverage report | |
run: | | |
dart pub global activate coverage | |
dart run test --coverage=./coverage | |
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
directory: ./coverage/ | |
flags: unittests | |
env_vars: OS,DART | |
fail_ci_if_error: true | |
verbose: true | |
- name: dart pub publish --dry-run | |
run: dart pub publish --dry-run | |