Files
arcane_framework/.github/workflows/analyze-and-unit-test.yaml
T
2025-04-29 14:16:17 +02:00

33 lines
951 B
YAML

name: Tests
on:
workflow_dispatch:
pull_request:
jobs:
test:
name: Analyze and test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Flutter version from .puro.json
id: puro_version
run: |
if [[ -f ".puro.json" ]]; then
flutter_version=$(jq -r '.env' .puro.json)
echo "FLUTTER_VERSION=$flutter_version" >> $GITHUB_ENV
else
echo "Warning: .puro.json not found, using default Flutter stable channel."
echo "FLUTTER_VERSION=stable" >> $GITHUB_ENV
fi
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Test
run: flutter test