docs: README #12
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: Checkout | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
- "develop" | |
- "feature/**" | |
- "bugfix/**" | |
- "hotfix/**" | |
- "support/**" | |
paths: | |
- "**/pubspec.yaml" | |
- "**/pubspec.lock" | |
- "packages/**/lib/**.dart" | |
- "packages/**/test/**.dart" | |
- "example/**.dart" | |
permissions: | |
contents: read | |
actions: read | |
checks: write | |
jobs: | |
checkout: | |
name: "🧪 Check code with analysis, format, and tests" | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
defaults: | |
run: | |
working-directory: ./ | |
steps: | |
- name: 📦 Get the .github actions | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github | |
- name: 🚂 Setup Flutter and dependencies | |
uses: ./.github/actions/setup | |
with: | |
flutter-version: 3.27.2 | |
- name: 👷 Install Dependencies | |
timeout-minutes: 1 | |
run: | | |
flutter pub get | |
- name: 🚦 Check code format | |
id: check-format | |
timeout-minutes: 1 | |
run: | | |
find packages/**/lib packages/**/test -name "*.dart" ! -name "*.*.dart" -print0 | xargs -0 dart format --set-exit-if-changed --line-length 120 -o none | |
- name: 📈 Check for Warnings | |
id: check-analyzer | |
timeout-minutes: 1 | |
run: | | |
flutter analyze --fatal-infos --fatal-warnings packages/modulisto packages/modulisto_flutter | |
- name: 🧪 Unit & Widget tests | |
timeout-minutes: 2 | |
run: | | |
flutter test -r github --concurrency=6 --coverage packages/modulisto packages/modulisto_flutter |