Testing GH actions

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2025-04-29 13:47:30 +02:00
parent d4b6c5467d
commit 990807dc3a
@@ -0,0 +1,37 @@
name: Tests
on:
workflow_dispatch:
pull_request:
push:
env:
FLUTTER_VERSION: "stable"
jobs:
test:
name: Analyze and test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- id: puro_version
run: |
content=`cat ./puro.json`
# the following lines are only required for multi line json
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
# end of optional handling for multi line json
echo "::set-output name=packageJson::$content"
- run: |
export FLUTTER_VERSION="${{fromJson(steps.puro_version.outputs.packageJson).env}}"
- 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