fix(quality): remove unused variables and exclude web from tests #29
Workflow file for this run
This file contains hidden or 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: Code Coverage | |
| on: [push, pull_request] | |
| env: | |
| PUB_ENVIRONMENT: bot.github | |
| jobs: | |
| test_with_coverage: | |
| name: Unit Tests with Coverage | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Cache Pub Dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| .dart_tool | |
| key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pub- | |
| - name: Install Melos | |
| run: | | |
| flutter pub global activate melos | |
| echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH | |
| - name: Bootstrap Workspace | |
| run: melos bootstrap | |
| - name: Run Tests with Coverage | |
| run: flutter test --coverage | |
| working-directory: packages/local_storage_cache | |
| - name: Verify Coverage File | |
| run: | | |
| if [ -f "packages/local_storage_cache/coverage/lcov.info" ]; then | |
| echo "Coverage file found" | |
| ls -lh packages/local_storage_cache/coverage/lcov.info | |
| else | |
| echo "Coverage file not found" | |
| exit 1 | |
| fi | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: packages/local_storage_cache/coverage/lcov.info | |
| - name: Upload Coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: packages/local_storage_cache/coverage/lcov.info | |
| flags: unittests | |
| name: codecov-flutter | |
| fail_ci_if_error: true |