From 8ba7c73e2b204d1c5ce6717b4a5a88010cd040b2 Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 27 Apr 2025 15:35:31 +0200 Subject: [PATCH] Update and rename dart.yml to flutter.yml --- .github/workflows/{dart.yml => flutter.yml} | 52 ++++++++++----------- 1 file changed, 25 insertions(+), 27 deletions(-) rename .github/workflows/{dart.yml => flutter.yml} (81%) diff --git a/.github/workflows/dart.yml b/.github/workflows/flutter.yml similarity index 81% rename from .github/workflows/dart.yml rename to .github/workflows/flutter.yml index 073c374..dfe6316 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/flutter.yml @@ -1,15 +1,11 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Flutter on: push: - branches-ignore: [] + branches: + - "develop" + - "main" pull_request: - branches: [ "develop", "prod" ] jobs: lint: @@ -24,7 +20,6 @@ jobs: channel: 'stable' - name: Check Formatting - id: check_format run: | if ! dart format --set-exit-if-changed .; then echo "needs_formatting=true" >> $GITHUB_OUTPUT @@ -56,21 +51,39 @@ jobs: - name: Auto-format run: | - dart format . # Korrigiert Formatierung - dart fix --apply # Behebt einfache Issues + dart format . + dart fix --apply - name: Commit Changes run: | git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" git add . - git commit -m "style: Auto-formatting [skip ci]" + git commit -m "Actions: Auto-formatting [skip ci]" git push - + + test: + runs-on: macos-latest + needs: lint + steps: + - uses: actions/checkout@v4 + + - name: Set Up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.29.2' + channel: 'stable' + + - name: Run Tests + run: flutter test + + build: runs-on: macos-latest + needs: test if: false # skips job + steps: - uses: actions/checkout@v4 @@ -88,18 +101,3 @@ jobs: - name: Run App run: flutter run - - test: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set Up Flutter - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.29.2' - channel: 'stable' - - - name: Run tests - run: flutter test