Update and rename dart.yml to flutter.yml

This commit is contained in:
2025-04-27 15:35:31 +02:00
committed by GitHub
parent 783ee7f36a
commit 8ba7c73e2b

View File

@@ -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 name: Flutter
on: on:
push: push:
branches-ignore: [] branches:
- "develop"
- "main"
pull_request: pull_request:
branches: [ "develop", "prod" ]
jobs: jobs:
lint: lint:
@@ -24,7 +20,6 @@ jobs:
channel: 'stable' channel: 'stable'
- name: Check Formatting - name: Check Formatting
id: check_format
run: | run: |
if ! dart format --set-exit-if-changed .; then if ! dart format --set-exit-if-changed .; then
echo "needs_formatting=true" >> $GITHUB_OUTPUT echo "needs_formatting=true" >> $GITHUB_OUTPUT
@@ -56,21 +51,39 @@ jobs:
- name: Auto-format - name: Auto-format
run: | run: |
dart format . # Korrigiert Formatierung dart format .
dart fix --apply # Behebt einfache Issues dart fix --apply
- name: Commit Changes - name: Commit Changes
run: | run: |
git config --global user.name "GitHub Actions" git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com" git config --global user.email "actions@github.com"
git add . git add .
git commit -m "style: Auto-formatting [skip ci]" git commit -m "Actions: Auto-formatting [skip ci]"
git push 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: build:
runs-on: macos-latest runs-on: macos-latest
needs: test
if: false # skips job if: false # skips job
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -88,18 +101,3 @@ jobs:
- name: Run App - name: Run App
run: flutter run 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