Merge pull request #98 from Prime-Holding/develop #446
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: CI | |
on: | |
push: | |
paths: | |
- ".github/workflows/ci.yaml" | |
- "packages/**" | |
jobs: | |
flutter_packages: | |
strategy: | |
matrix: | |
folder: | |
[ | |
"packages/widget_toolkit", | |
"packages/widget_toolkit_otp", | |
"packages/widget_toolkit_biometrics", | |
"packages/widget_toolkit_qr", | |
"packages/widget_toolkit_pin" | |
] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: subosito/[email protected] | |
with: | |
channel: "stable" | |
- run: dart --version | |
- run: flutter --version | |
- name: Install Dependencies | |
working-directory: ${{ matrix.folder }} | |
run: flutter pub get | |
- name: Analyze | |
working-directory: ${{ matrix.folder }} | |
run: flutter analyze lib | |
- name: Run tests | |
working-directory: ${{ matrix.folder }} | |
run: | | |
if [ -d "test" ]; then | |
flutter test --coverage --exclude-tags=not-tests | |
fi | |
- name: Remove unnecessary files | |
working-directory: ${{ matrix.folder }} | |
run: flutter pub run clean_coverage clean --exclusions '**/.g.dart','**repository.dart','**rxb.g.dart','**_dependencies.dart' coverage/lcov.info | |
- name: Check Code Coverage | |
uses: VeryGoodOpenSource/very_good_coverage@v2 | |
with: | |
path: "${{ matrix.folder }}/coverage/lcov.info" | |
min_coverage: 58 | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
directory: ${{ matrix.folder }}/coverage | |
token: ${{ secrets.CODECOV_TOKEN }} | |