fix: default analytics off for all installs, not just F-Droid (#74) #161
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| test: | |
| name: Analyze & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Flutter | |
| id: flutter-action | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version-file: './workout-logger/pubspec.yaml' | |
| channel: 'stable' | |
| cache: true | |
| # Custom pub cache key hashing pubspec.lock to invalidate cache on dependency changes | |
| pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-${{ hashFiles('workout-logger/pubspec.lock') }}" | |
| - name: Install dependencies | |
| if: steps.flutter-action.outputs.PUB-CACHE-HIT != 'true' | |
| working-directory: ./workout-logger | |
| run: flutter pub get | |
| - name: Analyze | |
| working-directory: ./workout-logger | |
| run: | | |
| # Only fail on errors, ignore warnings and info messages | |
| flutter analyze --no-fatal-infos --no-fatal-warnings | tee analyze_output.txt | |
| # Extract and display the summary of issues | |
| SUMMARY=$(tail -n 1 analyze_output.txt) | |
| echo "Analysis Summary: $SUMMARY" | |
| echo "### Analysis Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "$SUMMARY" >> $GITHUB_STEP_SUMMARY | |
| - name: Run tests | |
| working-directory: ./workout-logger | |
| run: flutter test --coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: workout-logger/coverage/lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} |