Merge pull request #1332 from juliansteenbakker/feature/workflows #5
This file contains 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: 📝 Code Quality | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
env: | |
PUB_ENVIRONMENT: bot.github | |
jobs: | |
analysis: | |
name: 🔍 Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout Code | |
uses: actions/checkout@v4 | |
- name: ⚡ Set Up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: 🔍 Flutter Version Info | |
run: flutter doctor -v | |
- name: 📦 Cache Pub Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.pub-cache | |
.dart_tool | |
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pub- | |
- name: 🔧 Bootstrap Workspace | |
run: flutter pub get | |
- name: ✅ Lint Code | |
run: flutter analyze | |
formatting: | |
name: 🎨 Formatting | |
needs: analysis # This makes formatting start after analysis is complete | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout Code | |
uses: actions/checkout@v4 | |
- name: ⚡ Set Up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: 🔧 Bootstrap Workspace | |
run: flutter pub get | |
- name: 🎯 Check Code Formatting | |
run: dart format --set-exit-if-changed . |