-
Notifications
You must be signed in to change notification settings - Fork 105
43 lines (41 loc) · 1.51 KB
/
PR-generate-goldens.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
43
name: Generate Updated Goldens
on:
push:
branches-ignore: [master, release, dev] # only run on feature branches
paths:
- '**/golden_tests/**.dart'
workflow_dispatch:
jobs:
generate-goldens:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '12.x'
- name: Checkout Flutter Stable Channel
uses: subosito/[email protected]
with:
channel: 'stable'
- name: Get Pub Dependencies
run: flutter pub get
- name: Run Build Runner For Codegen Files
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Run tests
run: flutter test --update-goldens --tags=golden test/golden_tests
- name: Commit Updated Goldens
run: |
git config --global user.name 'arafaysaleem'
git config --global user.email '[email protected]'
git add -A
git diff-index --quiet HEAD || git commit -m "test(Goldens): update generated goldens for new changes"
- name: GitHub Push To Repository
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.EZ_TICKETS_APP_TOKEN }}
branch: ${{ github.ref }}