File tree Expand file tree Collapse file tree 6 files changed +31
-10
lines changed Expand file tree Collapse file tree 6 files changed +31
-10
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,18 @@ runs:
36
36
if : matrix.target == 'linux' || matrix.target == 'windows' || matrix.target == 'macos'
37
37
working-directory : ${{ inputs.directory }}
38
38
shell : bash
39
+ env :
40
+ INPUT_DIRECTORY : ${{ inputs.directory }}
39
41
run : |
40
- testCmd="flutter test ${{ (inputs.directory == 'isar' && '-j 1') || '' }} --test-randomize-ordering-seed=random"
42
+ if [[ "$INPUT_DIRECTORY" == 'isar' ]]; then
43
+ testCmd="flutter test -j 1 --test-randomize-ordering-seed=random"
44
+ else
45
+ testCmd="flutter test --test-randomize-ordering-seed=random"
46
+ fi
47
+
41
48
if ${{ (matrix.target == 'linux' && matrix.sdk == 'stable' && 'true') || 'false' }} ; then
42
49
$testCmd --coverage
43
- if [[ '${{ inputs.directory }}' == 'flutter' ]] ; then
50
+ if [[ "$INPUT_DIRECTORY" == 'flutter' ]] ; then
44
51
dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart'
45
52
fi
46
53
else
Original file line number Diff line number Diff line change @@ -37,10 +37,16 @@ jobs:
37
37
-
uses :
subosito/flutter-action@395322a6cded4e9ed503aebd4cc1965625f8e59a # [email protected]
38
38
if : ${{ inputs.sdk == 'flutter' }}
39
39
40
- - run : ${{ inputs.sdk }} pub get
41
- - run : ${{ inputs.sdk }} pub get
40
+ - run : dart pub get
41
+ if : ${{ inputs.sdk == 'dart' }}
42
+
43
+ - run : flutter pub get
44
+ if : ${{ inputs.sdk == 'flutter' }}
45
+
46
+ - run : flutter pub get
42
47
if : ${{ inputs.package == 'flutter' }}
43
48
working-directory : flutter/microbenchmarks
49
+
44
50
- run : dart format --set-exit-if-changed ./
45
51
46
52
- name : dart analyze
@@ -77,10 +83,11 @@ jobs:
77
83
env :
78
84
TOTAL : ${{ steps.analysis.outputs.total }}
79
85
TOTAL_MAX : ${{ steps.analysis.outputs.total_max }}
86
+ PANA_THRESHOLD : ${{ inputs.panaThreshold }}
80
87
run : |
81
88
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
82
- if (( $PERCENTAGE < ${{ inputs.panaThreshold }} ))
89
+ if (( $PERCENTAGE < $PANA_THRESHOLD ))
83
90
then
84
- echo "Score too low ($PERCENTAGE % is less than the expected ${{ inputs.panaThreshold }} %)!"
91
+ echo "Score too low ($PERCENTAGE % is less than the expected $PANA_THRESHOLD %)!"
85
92
exit 1
86
93
fi
Original file line number Diff line number Diff line change 69
69
# we need to pass the current branch, otherwise we can't commit the changes.
70
70
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
71
71
- name : Commit & push
72
- run : ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Update class diagrams"
72
+ run : ./scripts/commit-code.sh "$BRANCH_NAME" "Update class diagrams"
73
+ env :
74
+ BRANCH_NAME : ${{ steps.extract_branch.outputs.branch }}
Original file line number Diff line number Diff line change @@ -45,10 +45,11 @@ jobs:
45
45
env :
46
46
GITHUB_TOKEN : ${{ github.token }}
47
47
48
- - run : dart run bin/flutter_symbol_collector.dart --version=${{ inputs.flutter_version || '3.*.*' }}
48
+ - run : dart run bin/flutter_symbol_collector.dart --version="$FLUTTER_VERSION"
49
49
timeout-minutes : 300
50
50
env :
51
51
GITHUB_TOKEN : ${{ github.token }}
52
+ FLUTTER_VERSION : ${{ inputs.flutter_version || '3.*.*' }}
52
53
53
54
- name : Upload updated status cache of processed files
54
55
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -157,7 +157,9 @@ jobs:
157
157
# Should be OK because it will likely be removed after switching to FFI (see https://github.com/getsentry/sentry-dart/issues/1444).
158
158
if : ${{ matrix.target != 'macos' }}
159
159
working-directory : ./flutter/example/${{ matrix.target }}
160
- run : xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=${{ steps.device.outputs.platform }}" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
160
+ run : xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=$DEVICE_PLATFORM" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
161
+ env :
162
+ DEVICE_PLATFORM : ${{ steps.device.outputs.platform }}
161
163
162
164
test-web :
163
165
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 51
51
# we need to pass the current branch, otherwise we can't commit the changes.
52
52
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
53
53
- name : Commit & push
54
- run : ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Format & fix code"
54
+ run : ./scripts/commit-code.sh "$BRANCH_NAME" "Format & fix code"
55
+ env :
56
+ BRANCH_NAME : ${{ steps.extract_branch.outputs.branch }}
You can’t perform that action at this time.
0 commit comments