Merge pull request #15 from jinyus/patch-1 #69
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: build_and_test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
device: | |
- "ubuntu" | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.10.6" | |
channel: "stable" | |
cache: true | |
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" | |
architecture: x64 | |
- name: Get Dependencies | |
run: flutter pub get | |
- name: Analyze | |
run: dart analyze lib --no-fatal-warnings | |
- name: Check Formatting | |
run: dart format lib --set-exit-if-changed | |
- name: Run Tests | |
run: flutter test --coverage --update-goldens | |
- name: Check Test Coverage | |
uses: VeryGoodOpenSource/very_good_coverage@v1.2.0 | |
with: | |
path: "coverage/lcov.info" | |
min_coverage: 100 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |