From c36fd6cea637eb7381c727154eb19d4c94870a7a Mon Sep 17 00:00:00 2001 From: Benjamin Canape Date: Sun, 4 Feb 2024 11:17:38 +0100 Subject: [PATCH] refactor ci (#42) --- .github/workflows/android.yml | 29 ------------- .github/workflows/ci.yml | 67 ++++++++++++++++++++++++++++++ .github/workflows/flutter_test.yml | 27 ------------ .github/workflows/ios.yml | 24 ----------- 4 files changed, 67 insertions(+), 80 deletions(-) delete mode 100644 .github/workflows/android.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/flutter_test.yml delete mode 100644 .github/workflows/ios.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml deleted file mode 100644 index 739d2a6d..00000000 --- a/.github/workflows/android.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Build Android - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: '11' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.16.9' - - name: Install dependencies - run: flutter pub get - - name: Generate l10n - run: flutter gen-l10n - - name: Build apk - run: flutter build apk - - name: Build appbundle - run: flutter build appbundle diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2d9af565 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: Build mobile apps & check tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build-android: + name: Build android + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '11' + - uses: subosito/flutter-action@v2 + with: + flutter-version: '3.16.9' + - name: Install dependencies + run: flutter pub get + - name: Generate l10n + run: flutter gen-l10n + - name: Build apk + run: flutter build apk + - name: Build appbundle + run: flutter build appbundle + + build-ios: + name: Build ios + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + architecture: x64 + - name: Install dependencies + run: flutter pub get + - name: Generate l10n + run: flutter gen-l10n + - name: Build ios + run: flutter build ios --release --no-codesign + + check-tests: + name: Check Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + flutter-version: '3.16.9' + channel: 'stable' + - name: Flutter doctor + run: flutter doctor + - name: Get dependencies + run: flutter pub get + - name: Run l10n generation + run: flutter gen-l10n + - name: Run tests + run: flutter test + diff --git a/.github/workflows/flutter_test.yml b/.github/workflows/flutter_test.yml deleted file mode 100644 index 783955f3..00000000 --- a/.github/workflows/flutter_test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - test: - name: Flutter Tests - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.16.9' - channel: 'stable' - - name: Flutter doctor - run: flutter doctor - - name: Get dependencies - run: flutter pub get - - name: Run l10n generation - run: flutter gen-l10n - - name: Run tests - run: flutter test diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml deleted file mode 100644 index 2b8ea68a..00000000 --- a/.github/workflows/ios.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build ios - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - architecture: x64 - - name: Install dependencies - run: flutter pub get - - name: Generate l10n - run: flutter gen-l10n - - name: Build ios - run: flutter build ios --release --no-codesign