Skip to content

Commit bcec24e

Browse files
authored
Fix failing tests (#327)
* try to fix failing tests * continue on error * remove Flutter versions that aren't available natively for arm64 macOS * explicitly specify arch = x64 (`-a x64`) * fix order of args * remove redundant quotes * make `dry-run` also accept bools
1 parent 94b32dd commit bcec24e

File tree

2 files changed

+32
-31
lines changed

2 files changed

+32
-31
lines changed

.github/workflows/workflow.yaml

+31-30
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ jobs:
5454
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
5555
shell: bash
5656
- run: dart --version
57-
if: ${{ matrix.dry-run != 'true' }}
57+
if: ${{ matrix.dry-run != true }}
5858
shell: bash
5959
- run: flutter --version
60-
if: ${{ matrix.dry-run != 'true' }}
60+
if: ${{ matrix.dry-run != true }}
6161
shell: bash
6262
- run: "! dart --version"
63-
if: ${{ matrix.dry-run == 'true' }}
63+
if: ${{ matrix.dry-run == true }}
6464
shell: bash
6565
- run: "! flutter --version"
66-
if: ${{ matrix.dry-run == 'true' }}
66+
if: ${{ matrix.dry-run == true }}
6767
shell: bash
6868

6969
test_cache:
@@ -111,6 +111,9 @@ jobs:
111111
test_print_output:
112112
runs-on: macos-latest
113113

114+
# These calls to setup.sh sepcify the -t flag, which enables test mode.
115+
# Test mode uses hardcoded Flutter release manifests from test/ directory.
116+
114117
steps:
115118
- name: Clone repository
116119
uses: actions/checkout@v4
@@ -120,7 +123,7 @@ jobs:
120123
shell: bash
121124
- run: ./setup.sh -t -p | grep '3.7.7'
122125
shell: bash
123-
- run: ./setup.sh -t -p | grep 'x64'
126+
- run: ./setup.sh -t -p -a x64 | grep 'x64'
124127
shell: bash
125128
- run: ./setup.sh -t -p stable | grep 'stable'
126129
shell: bash
@@ -132,13 +135,13 @@ jobs:
132135
shell: bash
133136
- run: ./setup.sh -t -p -n 3.3.1 stable | grep '3.3.1'
134137
shell: bash
135-
- run: ./setup.sh -t -p -n 2 stable | grep '2.10.5'
138+
- run: ./setup.sh -t -p -n 2 -a x64 stable | grep '2.10.5'
136139
shell: bash
137-
- run: ./setup.sh -t -p -n 2 beta | grep '2.13.0-0.4.pre'
140+
- run: ./setup.sh -t -p -n 2 -a x64 beta | grep '2.13.0-0.4.pre'
138141
shell: bash
139-
- run: ./setup.sh -t -p -n 2 any | grep 'beta'
142+
- run: ./setup.sh -t -p -n 2 -a x64 any | grep 'beta'
140143
shell: bash
141-
- run: ./setup.sh -t -p -n 2 any | grep '2.13.0-0.4.pre'
144+
- run: ./setup.sh -t -p -n 2 -a x64 any | grep '2.13.0-0.4.pre'
142145
shell: bash
143146
- run: ./setup.sh -t -p -n 3 any | grep 'beta'
144147
shell: bash
@@ -152,47 +155,45 @@ jobs:
152155
shell: bash
153156
- run: ./setup.sh -t -p -n any -a arm64 stable | grep 'arm64'
154157
shell: bash
155-
- run: ./setup.sh -t -p -n 1 stable | grep '1.22.6'
156-
shell: bash
157-
- run: ./setup.sh -t -p -n 0 any | grep 'beta'
158+
- run: ./setup.sh -t -p -n 1 -a x64 stable | grep '1.22.6'
158159
shell: bash
159-
- run: ./setup.sh -t -p -n 0 any | grep '0.11.13'
160+
- run: ./setup.sh -t -p -n 0 -a x64 any | grep 'beta'
160161
shell: bash
161-
- run: ./setup.sh -t -p | grep 'flutter-macos-stable-3.7.7-x64-2ad6cd72c040113b47ee9055e722606a490ef0da'
162+
- run: ./setup.sh -t -p -n 0 -a x64 any | grep '0.11.13'
162163
shell: bash
163-
- run: ./setup.sh -t -p stable | grep 'flutter-macos-stable-3.7.7-x64-2ad6cd72c040113b47ee9055e722606a490ef0da'
164+
- run: ./setup.sh -t -p -a x64 | grep 'flutter-macos-stable-3.7.7-x64-2ad6cd72c040113b47ee9055e722606a490ef0da'
164165
shell: bash
165-
- run: ./setup.sh -t -p beta | grep 'flutter-macos-beta-3.9.0-0.1.pre-x64-f732038a8cf4562ce38a1d7debb30209ae3da896'
166+
- run: ./setup.sh -t -p -a x64 stable | grep 'flutter-macos-stable-3.7.7-x64-2ad6cd72c040113b47ee9055e722606a490ef0da'
166167
shell: bash
167-
- run: ./setup.sh -t -p dev | grep 'flutter-macos-dev-2.11.0-0.1.pre-x64-b101bfe32f634566e7cb2791a9efe19cf8828b15'
168+
- run: ./setup.sh -t -p -a x64 beta | grep 'flutter-macos-beta-3.9.0-0.1.pre-x64-f732038a8cf4562ce38a1d7debb30209ae3da896'
168169
shell: bash
169-
- run: ./setup.sh -t -p master | grep 'flutter-macos-master-any-x64-master'
170+
- run: ./setup.sh -t -p -a x64 dev | grep 'flutter-macos-dev-2.11.0-0.1.pre-x64-b101bfe32f634566e7cb2791a9efe19cf8828b15'
170171
shell: bash
171-
- run: ./setup.sh -t -p -n 5b12b74 master | grep 'flutter-macos-master-5b12b74-x64-master'
172+
- run: ./setup.sh -t -p -a x64 master | grep 'flutter-macos-master-any-x64-master'
172173
shell: bash
173-
- run: ./setup.sh -t -p -n 3.12.0-12.0.pre master | grep 'flutter-macos-master-3.12.0-12.0.pre-x64-master'
174+
- run: ./setup.sh -t -p -n 5b12b74 -a x64 master | grep 'flutter-macos-master-5b12b74-x64-master'
174175
shell: bash
175-
- run: ./setup.sh -t -p -n stable master | grep 'flutter-macos-master-stable-x64-master'
176+
- run: ./setup.sh -t -p -n 3.12.0-12.0.pre -a x64 master | grep 'flutter-macos-master-3.12.0-12.0.pre-x64-master'
176177
shell: bash
177-
- run: ./setup.sh -t -p -n 2 any | grep 'flutter-macos-beta-2.13.0-0.4.pre-x64-25caf1461b8f643092a9f6f5b224453b5c057d10'
178+
- run: ./setup.sh -t -p -n 2 -a x64 any | grep 'flutter-macos-beta-2.13.0-0.4.pre-x64-25caf1461b8f643092a9f6f5b224453b5c057d10'
178179
shell: bash
179-
- run: ./setup.sh -t -p -n 1 any | grep 'flutter-macos-beta-1.26.0-17.8.pre-x64-044f2cf5607a26f8818dab0f766400e85c52bdff'
180+
- run: ./setup.sh -t -p -n 1 -a x64 any | grep 'flutter-macos-beta-1.26.0-17.8.pre-x64-044f2cf5607a26f8818dab0f766400e85c52bdff'
180181
shell: bash
181-
- run: ./setup.sh -t -p -n 0 any | grep 'flutter-macos-beta-0.11.13-x64-58c8489fcdb4e4ef6c010117584c9b23d15221aa'
182+
- run: ./setup.sh -t -p -n 0 -a x64 any | grep 'flutter-macos-beta-0.11.13-x64-58c8489fcdb4e4ef6c010117584c9b23d15221aa'
182183
shell: bash
183-
- run: ./setup.sh -t -p | grep '/Users/runner/hostedtoolcache/flutter/stable-3.7.7-x64'
184+
- run: ./setup.sh -t -p -a x64 | grep '/Users/runner/hostedtoolcache/flutter/stable-3.7.7-x64'
184185
shell: bash
185-
- run: ./setup.sh -t -p stable | grep '/Users/runner/hostedtoolcache/flutter/stable-3.7.7-x64'
186+
- run: ./setup.sh -t -p -a x64 stable | grep '/Users/runner/hostedtoolcache/flutter/stable-3.7.7-x64'
186187
shell: bash
187-
- run: ./setup.sh -t -p beta | grep '/Users/runner/hostedtoolcache/flutter/beta-3.9.0-0.1.pre-x64'
188+
- run: ./setup.sh -t -p -a x64 beta | grep '/Users/runner/hostedtoolcache/flutter/beta-3.9.0-0.1.pre-x64'
188189
shell: bash
189-
- run: ./setup.sh -t -p dev | grep '/Users/runner/hostedtoolcache/flutter/dev-2.11.0-0.1.pre-x64'
190+
- run: ./setup.sh -t -p -a x64 dev | grep '/Users/runner/hostedtoolcache/flutter/dev-2.11.0-0.1.pre-x64'
190191
shell: bash
191-
- run: ./setup.sh -t -p master | grep '/Users/runner/hostedtoolcache/flutter/master-any-x64'
192+
- run: ./setup.sh -t -p -a x64 master | grep '/Users/runner/hostedtoolcache/flutter/master-any-x64'
192193
shell: bash
193194
- run: ./setup.sh -t -p -k 'custom-:channel:-:version:-:hash:' | grep 'custom-stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da'
194195
shell: bash
195-
- run: ./setup.sh -t -p -k 'custom-:channel:-:version:-:sha256:' | grep 'custom-stable-3.7.7-78957b52f023a0d811add27eddc59b1a59d27d2ada5df123f39d0315708fb2d5'
196+
- run: ./setup.sh -t -p -k 'custom-:channel:-:version:-:sha256:' -a x64 | grep 'custom-stable-3.7.7-78957b52f023a0d811add27eddc59b1a59d27d2ada5df123f39d0315708fb2d5'
196197
shell: bash
197198
- run: ./setup.sh -t -p -c '/tmp/flutter/:channel:-:version:-:hash:' | grep '/tmp/flutter/stable-3.7.7-2ad6cd72c040113b47ee9055e722606a490ef0da'
198199
shell: bash

action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ runs:
112112
113113
- name: Run setup script
114114
shell: bash
115-
if: ${{ inputs.dry-run != 'true' }}
115+
if: ${{ inputs.dry-run != 'true' && inputs.dry-run != true }}
116116
run: |
117117
$GITHUB_ACTION_PATH/setup.sh \
118118
-n '${{ steps.flutter-action.outputs.VERSION }}' \

0 commit comments

Comments
 (0)