audio tests #33
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: Analyze and run tests | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "**.dart" | |
- "!**.g.dart" | |
- "!**.freezed.dart" | |
pull_request: | |
branches: | |
- master | |
paths: | |
- "**.dart" | |
- "!**.g.dart" | |
- "!**.freezed.dart" | |
jobs: | |
build: | |
name: Analyze project source and run tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' # or: 'stable', 'beta', 'main' or 'master' | |
cache: true | |
- run: flutter doctor -v | |
- name: Install dependencies from pub | |
run: flutter pub get | |
- name: Generate with build_runner | |
run: flutter pub run build_runner build --delete-conflicting-outputs | |
- name: Analyze project source | |
run: flutter analyze --no-fatal-infos | |
- name: Run tests and collect coverage | |
run: flutter test --coverage test/ | |
- name: Clean coverage | |
run: | | |
sudo apt-get -y install lcov | |
lcov -r coverage/lcov.info -o coverage/lcov.info "lib/**.freezed.dart" "lib/**.g.dart" "lib/src/common/localization/*" --ignore-errors unused | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |