Skip to content

Golden test generation #52

Golden test generation

Golden test generation #52

name: "Golden test generation"
on:
workflow_dispatch:
inputs:
package:
description: 'The name of the package'
required: true
type: choice
options:
- widget_toolkit
- widget_toolkit_biometrics
- widget_toolkit_otp
- widget_toolkit_pin
- widget_toolkit_qr
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- run: dart --version
- run: flutter --version
- name: Install Dependencies
working-directory: "packages/${{ inputs.package }}"
run: dart pub get
- name: Analyze
working-directory: "packages/${{ inputs.package }}"
run: flutter analyze lib
- name: Generate golden files
working-directory: "packages/${{ inputs.package }}"
run: flutter test --update-goldens
- name: Upload test directory
uses: actions/upload-artifact@v3
with:
name: "${{ inputs.package }}_tests"
path: "packages/${{ inputs.package }}/test/"