Implement Flutter-based Flatseal application for Flatpak permission management (Linux Desktop) #13
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: Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| analyze: | |
| name: Analyze Code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.16.0' | |
| channel: 'stable' | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Analyze code | |
| run: flutter analyze | |
| - name: Check formatting | |
| run: flutter format --set-exit-if-changed lib/ | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.16.0' | |
| channel: 'stable' | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Run tests | |
| run: flutter test --coverage | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage/lcov.info | |
| build-linux: | |
| name: Build Linux | |
| runs-on: ubuntu-latest | |
| needs: [analyze, test] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.16.0' | |
| channel: 'stable' | |
| - name: Install Linux dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Enable Linux desktop | |
| run: flutter config --enable-linux-desktop | |
| - name: Build Linux release | |
| run: flutter build linux --release | |
| - name: Archive build artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: linux-build | |
| path: build/linux/x64/release/bundle/ | |
| retention-days: 7 |