Skip to content

fix: default analytics off for all installs, not just F-Droid (#74) #161

fix: default analytics off for all installs, not just F-Droid (#74)

fix: default analytics off for all installs, not just F-Droid (#74) #161

Workflow file for this run

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 }}