Skip to content

Commit 76eeca4

Browse files
authored
ci: Add WASM to Flutter test matrix (#1097)
1 parent 828355d commit 76eeca4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ jobs:
9797
- name: Flutter beta
9898
os: ubuntu-latest
9999
sdk: beta
100+
# WASM support
101+
- name: Flutter 3.38, Ubuntu, WASM
102+
os: ubuntu-latest
103+
sdk: 3.38.1
104+
wasm: true
100105
fail-fast: false
101106
name: Test ${{ matrix.name }}
102107
steps:
@@ -125,18 +130,22 @@ jobs:
125130
- name: Publish dry run
126131
run: cd packages/flutter && dart pub publish --dry-run
127132
- name: Run tests
133+
if: ${{ !matrix.wasm }}
128134
run: (cd packages/flutter && flutter test --coverage)
135+
- name: Run tests (WASM)
136+
if: ${{ matrix.wasm }}
137+
run: (cd packages/flutter && flutter test --platform chrome --wasm)
129138
- name: Convert code coverage
130139
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
131-
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
140+
if: ${{ always() && matrix.os == 'ubuntu-latest' && !matrix.wasm }}
132141
working-directory: packages/flutter
133142
run: |
134143
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')"
135144
sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info > coverage/lcov-full.info
136145
- name: Upload code coverage
137146
uses: codecov/codecov-action@v5
138147
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
139-
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
148+
if: ${{ always() && matrix.os == 'ubuntu-latest' && !matrix.wasm }}
140149
with:
141150
files: packages/flutter/coverage/lcov-full.info
142151
fail_ci_if_error: false

0 commit comments

Comments
 (0)