rm #13
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 CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.19.6' | |
# - name: Cache Flutter dependencies | |
# uses: actions/cache@v3 | |
# with: | |
# path: | | |
# ~/.pub-cache | |
# flutter/bin/cache | |
# # key: ${{ runner.os }}-pub-cache-${{ hashFiles('pubspec.yaml') }} | |
# key: ${{ runner.os }}-flutter-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} | |
# restore-keys: | | |
# ${{ runner.os }}-flutter- | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Run tests & generate coverage | |
run: flutter test --coverage | |
- name: Upload coverage to Codecov | |
env: | |
COVERAGE_KEY: ${{ secrets.COVERAGE_KEY }} | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage/lcov.info | |
flags: flutter | |
name: code-coverage-report | |
token: COVERAGE_KEY | |
fail_ci_if_error: true |