Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 0 additions & 213 deletions .github/workflows/build-example.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/build.yml

This file was deleted.

118 changes: 118 additions & 0 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Build Check

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
analyze:
name: Analyze & Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Get Dependencies
run: flutter pub get

- name: Check Formatting
run: dart format --output=none --set-exit-if-changed .

- name: Analyze
run: flutter analyze .

android-build:
name: Android Check
needs: analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '17'

- uses: subosito/flutter-action@v2
with:
channel: 'stable'

# Test Unitaire (Logique Dart)
- name: Get Dependencies (Package)
working-directory: packages/audioplayers
run: flutter pub get

- name: Run Unit Tests
working-directory: packages/audioplayers
run: flutter test

# Build Android (Vérification de la compilation)
- name: Get Dependencies (Example)
working-directory: packages/audioplayers/example
run: flutter pub get

- name: Build APK (Release)
working-directory: packages/audioplayers/example
run: flutter build apk --release --no-pub

linux-build:
name: Linux Check
needs: analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev xvfb libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

- uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Enable Linux Support
run: flutter config --enable-linux-desktop

- name: Get Dependencies
working-directory: packages/audioplayers/example
run: flutter pub get

- name: Run Integration Tests
working-directory: packages/audioplayers/example
run: xvfb-run flutter test integration_test/app_test.dart -d linux

- name: Build Linux (Release)
working-directory: packages/audioplayers/example
run: flutter build linux --release --no-pub

windows-build:
name: Windows Check
needs: analyze
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Enable Windows Support
run: flutter config --enable-windows-desktop

- name: Get Dependencies
working-directory: packages/audioplayers/example
run: flutter pub get

- name: Run Integration Tests
working-directory: packages/audioplayers/example
run: flutter test integration_test/app_test.dart -d windows

- name: Build Windows (Release)
working-directory: packages/audioplayers/example
run: flutter build windows --release --no-pub
Loading