1919 runs-on : ubuntu-latest
2020 outputs :
2121 dart-matrix : ${{ steps.detect.outputs.dart-matrix }}
22- sdk -matrix : ${{ steps.detect.outputs.sdk -matrix }}
22+ channel -matrix : ${{ steps.detect.outputs.channel -matrix }}
2323 flutter : ${{ steps.detect.outputs.flutter }}
2424 steps :
2525 - name : Checkout repository
4949 if [ -z "$BASE" ] || [ "$BASE" = "0000000000000000000000000000000000000000" ]; then
5050 FORCE_ALL=true
5151 elif git diff --name-only "$BASE...HEAD" \
52- | grep -qE '^(\.github/workflows/test\.yml|melos \.yaml|pubspec\.lock|supabase/)'; then
52+ | grep -qE '^(\.github/workflows/test\.yml|pubspec \.yaml|pubspec\.lock|supabase/)'; then
5353 FORCE_ALL=true
5454 fi
5555
@@ -88,13 +88,10 @@ jobs:
8888 fi
8989 echo "dart-matrix=$DART_MATRIX" >> "$GITHUB_OUTPUT"
9090
91- # Only exercise beta/dev SDKs on pushes to main. On pull requests we
92- # test stable only to keep the matrix small; upcoming-SDK breakage is
93- # caught on merge.
9491 if [ "${{ github.event_name }}" = "push" ]; then
95- echo 'sdk -matrix=["stable","beta","dev "]' >> "$GITHUB_OUTPUT"
92+ echo 'channel -matrix=["stable","beta","master "]' >> "$GITHUB_OUTPUT"
9693 else
97- echo 'sdk -matrix=["stable"]' >> "$GITHUB_OUTPUT"
94+ echo 'channel -matrix=["stable"]' >> "$GITHUB_OUTPUT"
9895 fi
9996
10097 if echo "$CHANGED" | grep -qx "supabase_flutter"; then
@@ -104,7 +101,7 @@ jobs:
104101 fi
105102
106103 test-dart :
107- name : Dart ${{ matrix.package.name }} (${{ matrix.sdk }})
104+ name : Dart ${{ matrix.package.name }} (${{ matrix.channel }})
108105 needs : changes
109106 if : ${{ needs.changes.outputs.dart-matrix != '[]' }}
110107 timeout-minutes : 20
@@ -113,40 +110,33 @@ jobs:
113110 fail-fast : false
114111 matrix :
115112 package : ${{ fromJSON(needs.changes.outputs.dart-matrix) }}
116- sdk : ${{ fromJSON(needs.changes.outputs.sdk -matrix) }}
113+ channel : ${{ fromJSON(needs.changes.outputs.channel -matrix) }}
117114
118115 steps :
119116 - name : Checkout repository
120117 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
121118
122- - name : Setup Dart
123- uses : dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c # v1.7.1
119+ - name : Setup Flutter
120+ uses : subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
124121 with :
125- sdk : ${{ matrix.sdk }}
122+ channel : ${{ matrix.channel }}
123+ cache : false
126124
127- - name : Cache pub dependencies
128- uses : actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
129- with :
130- path : |
131- ${{ env.PUB_CACHE }}
132- ~/.pub-cache
133- key : ${{ runner.os }}-pub-${{ matrix.sdk }}-${{ hashFiles('**/pubspec.lock') }}
134- restore-keys : |
135- ${{ runner.os }}-pub-${{ matrix.sdk }}-
136- ${{ runner.os }}-pub-
125+ - name : Show Flutter version
126+ run : flutter --version
137127
138128 - name : Bootstrap workspace
139129 run : |
140130 dart pub global activate melos
141- melos bootstrap --no-flutter
131+ melos bootstrap
142132
143133 - name : Format
144- if : ${{ matrix.sdk == 'stable' }}
134+ if : ${{ matrix.channel == 'stable' }}
145135 working-directory : packages/${{ matrix.package.name }}
146136 run : dart format lib test -l 80 --set-exit-if-changed
147137
148138 - name : Analyze
149- if : ${{ matrix.sdk == 'stable' }}
139+ if : ${{ matrix.channel == 'stable' }}
150140 working-directory : packages/${{ matrix.package.name }}
151141 run : dart analyze --fatal-infos .
152142
@@ -201,7 +191,7 @@ jobs:
201191 if [ "${{ matrix.package.concurrency }}" = "1" ]; then
202192 CONCURRENCY="--concurrency=1"
203193 fi
204- if [ "${{ matrix.sdk }}" = "stable" ]; then
194+ if [ "${{ matrix.channel }}" = "stable" ]; then
205195 dart pub global activate coverage
206196 dart test $CONCURRENCY --coverage=coverage
207197 dart pub global run coverage:format_coverage \
@@ -212,7 +202,7 @@ jobs:
212202 fi
213203
214204 - name : Upload coverage to Coveralls
215- if : ${{ matrix.sdk == 'stable' }}
205+ if : ${{ matrix.channel == 'stable' }}
216206 uses : coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
217207 with :
218208 github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments