Files
hans 6f2c3cd32d Remove debug
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
2025-04-29 14:16:17 +02:00

35 lines
1.0 KiB
YAML

name: Tests
on:
workflow_dispatch:
pull_request:
env:
PURO_FLUTTER_VERSION: ""
FLUTTER_VERSION: ""
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 "PURO_FLUTTER_VERSION=$flutter_version" >> $GITHUB_ENV
else
echo "Warning: .puro.json not found, using default Flutter stable channel."
echo "PURO_FLUTTER_VERSION=stable" >> $GITHUB_ENV
fi
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.PURO_FLUTTER_VERSION == 'stable' && '' || env.FLUTTER_VERSION }}
- name: Install dependencies
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Test
run: flutter test