Files
flutter/.github/workflows/ci.yml
2026-07-11 00:46:20 +02:00

51 lines
1.3 KiB
YAML

name: Continuous Integration
on:
# Direct pushes are only validated on master (post-merge); everything else
# is covered by the pull_request trigger, avoiding duplicate runs for
# same-repo PR branches.
push:
branches: [ master, ]
paths:
- '**.dart'
- 'pubspec.yaml'
pull_request:
paths:
- '**/*.dart'
- 'pubspec.yaml'
- '.github/actions/flutter-common/action.yml'
- '.github/workflows/ci.yml'
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
env:
TZ: Europe/Berlin
steps:
- uses: actions/checkout@v7
- name: Common flutter setup
uses: ./.github/actions/flutter-common
- name: Install dependencies
run: |
sudo apt install libsqlite3-dev lcov --no-install-recommends
flutter pub get
# Removing some folders from the coverage since these files are not really
# part of the app code and just get in the way of the report
- name: Test app
run: |
flutter test --coverage
lcov --remove coverage/lcov.info 'lib/l10n/generated/*' 'lib/theme/*' -o coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}