Update test.yml #6
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: Flutter Test | |
on: | |
push: | |
branches: | |
- main | |
- development | |
pull_request: | |
branches: | |
- main | |
- development | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.7.3' # specify your Flutter version | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Run tests | |
run: flutter test --coverage | |
working-directory: frontend | |
- name: Convert coverage to lcov | |
run: | | |
apt-get update && apt-get install lcov -y | |
lcov --directory . --capture --output-file coverage/lcov.info | |
working-directory: frontend | |
- name: Codecov | |
uses: codecov/codecov-action@v4.4.1 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
files: frontend/coverage/lcov.info | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |