-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (40 loc) · 1.24 KB
/
golden_test_generation.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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/"