Update test.yml #5
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: 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: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: 'latest' | |
- name: Install dependencies | |
run: flutter pub get | |
working-directory: frontend | |
- name: Run tests with coverage | |
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 }} |