ci: add public repository checks #1
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate: | |
| name: Analyze, test and build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - name: Install Linux build dependencies | |
| run: >- | |
| sudo apt-get update && | |
| sudo apt-get install -y | |
| clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev avahi-daemon | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 | |
| with: | |
| flutter-version: "3.44.8" | |
| channel: stable | |
| cache: true | |
| - name: Resolve dependencies | |
| run: flutter pub get | |
| - name: Check formatting | |
| run: dart format --output=none --set-exit-if-changed lib test | |
| - name: Analyze | |
| run: flutter analyze | |
| - name: Test | |
| run: flutter test | |
| - name: Build Android debug APK | |
| run: flutter build apk --debug | |
| - name: Build Linux debug bundle | |
| run: flutter build linux --debug |