mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-27 18:00:40 +00:00
Compare commits
20 commits
602a8d4cf3
...
e06650cf76
Author | SHA1 | Date | |
---|---|---|---|
|
e06650cf76 | ||
|
29eed73a1e | ||
|
a27651450a | ||
|
79d33f558d | ||
|
a19bf3df1c | ||
|
ff1260c5d9 | ||
|
6ecea38ec7 | ||
|
351631bb8a | ||
|
616f327f15 | ||
|
25aa5bbb5e | ||
|
ba7e48cfcf | ||
|
fb8b0f15c8 | ||
|
995180603d | ||
|
6431fdad43 | ||
|
69522153bb | ||
|
cd09efeb05 | ||
|
1b0443a588 | ||
|
27d56d1061 | ||
|
df399fd068 | ||
|
ead5df125b |
5 changed files with 10 additions and 76 deletions
12
.github/workflows/pr_check.yml
vendored
12
.github/workflows/pr_check.yml
vendored
|
@ -14,7 +14,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
analyze-and-test:
|
analyze-and-test:
|
||||||
name: Analyze & test
|
name: Analyze & test
|
||||||
runs-on: macos-11
|
runs-on: macos-14
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: 8BitJonny/gh-get-current-pr@2.2.0
|
- uses: 8BitJonny/gh-get-current-pr@2.2.0
|
||||||
|
@ -54,7 +54,9 @@ jobs:
|
||||||
run: flutter analyze lib --fatal-infos
|
run: flutter analyze lib --fatal-infos
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: flutter test
|
run: |
|
||||||
|
defaults -currentHost write -g AppleFontSmoothing -int 0
|
||||||
|
flutter test --dart-define cameraStubImage=assets/camera_stub_image.jpg
|
||||||
|
|
||||||
- name: Analyze project source with stub
|
- name: Analyze project source with stub
|
||||||
if: steps.override-iap.conclusion != 'success'
|
if: steps.override-iap.conclusion != 'success'
|
||||||
|
@ -62,9 +64,3 @@ jobs:
|
||||||
bash ./.github/scripts/stub_iap.sh
|
bash ./.github/scripts/stub_iap.sh
|
||||||
flutter pub get
|
flutter pub get
|
||||||
flutter analyze lib --fatal-infos
|
flutter analyze lib --fatal-infos
|
||||||
|
|
||||||
run-golden-tests:
|
|
||||||
name: Run golden tests
|
|
||||||
needs: [analyze-and-test]
|
|
||||||
uses: ./.github/workflows/run_golden_tests.yml
|
|
||||||
secrets: inherit
|
|
||||||
|
|
68
.github/workflows/run_golden_tests.yml
vendored
68
.github/workflows/run_golden_tests.yml
vendored
|
@ -1,68 +0,0 @@
|
||||||
# This workflow uses actions that are not certified by GitHub.
|
|
||||||
# They are provided by a third-party and are governed by
|
|
||||||
# separate terms of service, privacy policy, and support
|
|
||||||
# documentation.
|
|
||||||
|
|
||||||
name: Run golden tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
update-goldens:
|
|
||||||
type: boolean
|
|
||||||
description: Update goldens
|
|
||||||
default: false
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
update-goldens:
|
|
||||||
type: boolean
|
|
||||||
description: Update goldens
|
|
||||||
default: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run-golden-tests:
|
|
||||||
name: Run golden tests
|
|
||||||
timeout-minutes: 5
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: "stable"
|
|
||||||
flutter-version: "3.13.9"
|
|
||||||
|
|
||||||
- name: Prepare app
|
|
||||||
run: |
|
|
||||||
flutter --version
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run intl_utils:generate
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
env:
|
|
||||||
UPDATE_GOLDENS: ${{inputs.update-goldens && '--update-goldens' || '' }}ƒ
|
|
||||||
run: |
|
|
||||||
goldens=$(find ./test -name "*_golden_test.dart" -print)
|
|
||||||
for f in $goldens; do
|
|
||||||
flutter test "$f"\
|
|
||||||
--dart-define cameraStubImage=assets/camera_stub_image.jpg \
|
|
||||||
$UPDATE_GOLDENS
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Commit changes
|
|
||||||
if: ${{ inputs.update-goldens }}
|
|
||||||
run: |
|
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --local user.name "github-actions[bot]"
|
|
||||||
git add -A
|
|
||||||
git commit -m "Updated goldens"
|
|
||||||
|
|
||||||
- name: Push to main
|
|
||||||
if: ${{ inputs.update-goldens }}
|
|
||||||
uses: CasperWA/push-protected@v2
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.PUSH_TO_MAIN_TOKEN }}
|
|
||||||
branch: ${{ github.ref_name }}
|
|
||||||
unprotect_reviews: true
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
Before Width: | Height: | Size: 500 KiB After Width: | Height: | Size: 488 KiB |
6
update_goldens.sh
Normal file
6
update_goldens.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
defaults -currentHost write -g AppleFontSmoothing -int 0
|
||||||
|
goldens=$(find ./test -name "*_golden_test.dart" -print)
|
||||||
|
for f in $goldens; do
|
||||||
|
flutter test "$f" --dart-define cameraStubImage=assets/camera_stub_image.jpg --update-goldens
|
||||||
|
done
|
||||||
|
defaults -currentHost write -g AppleFontSmoothing -int 3
|
Loading…
Reference in a new issue