Skip to content

feature/split logic into bash and yaml files (#6) #45

feature/split logic into bash and yaml files (#6)

feature/split logic into bash and yaml files (#6) #45

Workflow file for this run

name: Test Actions
# Tests each composite action against a freshly created Flutter project.
#
# Strategy: the leaf composite actions run `flutter` commands from
# $GITHUB_WORKSPACE. To give them a valid Flutter project to operate on, each
# job:
# 1. Checks out this repo (action files) to $GITHUB_WORKSPACE.
# 2. Creates a minimal Flutter app in /tmp and copies its files into the
# workspace root (Flutter-specific paths don't conflict with action paths).
# 3. Runs the local action via `uses: ./<action-path>`.
#
# Note: orchestrator actions (check/action.yaml, root action.yml) reference
# sub-actions by absolute GitHub path, so they always call the published
# version. Only leaf actions are tested here to catch local changes on PRs.
on:
push:
branches: [main, feature/*]
pull_request:
jobs:
# ── Lint ───────────────────────────────────────────────────────────────────
lint:
name: Lint action YAML
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Run actionlint
uses: raven-actions/actionlint@v2
# ── check/analyze ──────────────────────────────────────────────────────────
test-analyze:
name: Test check/analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run check/analyze
uses: ./check/analyze
with:
# Relax severity so a stock generated app doesn't fail
analyze-fails-if-infos: 'false'
analyze-fails-if-warnings: 'false'
no-pub: 'true'
# ── check/license ──────────────────────────────────────────────────────────
test-license:
name: Test check/license
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run check/license
uses: ./check/license
with:
compatible-licenses-conf-path: .github/license_config_example.yml
# ── check/test ─────────────────────────────────────────────────────────────
test-flutter-test:
name: Test check/test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run check/test
uses: ./check/test
# ── build/web ──────────────────────────────────────────────────────────────
test-build-web:
name: Test build/web
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run build/web
uses: ./build/web
# ── build/linux ────────────────────────────────────────────────────────────
test-build-linux:
name: Test build/linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build pkg-config
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run build/linux
uses: ./build/linux
# ── build/windows ──────────────────────────────────────────────────────────
test-build-windows:
name: Test build/windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
shell: bash
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run build/windows
uses: ./build/windows
# ── build/android ─────────────────────────────────────────────────────────
test-build-android:
name: Test build/android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run build/android
uses: ./build/android
with:
android-store-file-base64: ''
android-store-password: ''
android-key-password: ''
android-key-alias: ''
build-mode: 'debug' # Avoid long release build for testing
# ── build/macos ────────────────────────────────────────────────────────────
test-build-macos:
name: Test build/macos
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run build/macos
uses: ./build/macos
with:
macos-distribution-certificate-base64: ''
macos-installer-certificate-base64: ''
macos-installer-certificate-password: ''
macos-provisioning-profile-base64: ''
macos-distribution-certificate-password: ''
build-mode: 'debug' # Avoid long release build for testing
# ── build/ios ──────────────────────────────────────────────────────────────
# Requires secret: IOS_SIGNING_CERTIFICATE_BASE64
test-build-ios:
name: Test build/ios
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Bootstrap Flutter test project
run: |
flutter create /tmp/test_app --project-name test_app --org com.example
cp -r /tmp/test_app/. .
flutter pub get
- name: Run build/ios
uses: ./build/ios
with:
ios-provisioning-profile-base64: ''
ios-distribution-certificate-base64: ''
ios-distribution-certificate-password: ''
build-mode: 'debug' # Avoid long release build for testing
code-sign: 'false' # Avoid code signing for testing