name: Tests on: workflow_dispatch: pull_request: 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