39
39
strategy :
40
40
fail-fast : true
41
41
matrix :
42
- os : [ ubuntu-latest ]
42
+ os : [ubuntu-latest]
43
43
include :
44
44
- os : ubuntu-latest
45
45
flutter_profile : development-linux-x86_64
73
73
strategy :
74
74
fail-fast : true
75
75
matrix :
76
- os : [ windows-latest ]
76
+ os : [windows-latest]
77
77
include :
78
78
- os : windows-latest
79
79
flutter_profile : development-windows-x86
@@ -100,7 +100,7 @@ jobs:
100
100
strategy :
101
101
fail-fast : true
102
102
matrix :
103
- os : [ macos-latest ]
103
+ os : [macos-latest]
104
104
include :
105
105
- os : macos-latest
106
106
flutter_profile : development-mac-x86_64
@@ -122,12 +122,12 @@ jobs:
122
122
flutter_profile : ${{ matrix.flutter_profile }}
123
123
124
124
unit_test :
125
- needs : [ prepare-linux ]
125
+ needs : [prepare-linux]
126
126
if : github.event.pull_request.draft != true
127
127
strategy :
128
128
fail-fast : false
129
129
matrix :
130
- os : [ ubuntu-latest ]
130
+ os : [ubuntu-latest]
131
131
include :
132
132
- os : ubuntu-latest
133
133
flutter_profile : development-linux-x86_64
@@ -216,11 +216,11 @@ jobs:
216
216
shell : bash
217
217
218
218
cloud_integration_test :
219
- needs : [ prepare-linux ]
219
+ needs : [prepare-linux]
220
220
strategy :
221
221
fail-fast : false
222
222
matrix :
223
- os : [ ubuntu-latest ]
223
+ os : [ubuntu-latest]
224
224
include :
225
225
- os : ubuntu-latest
226
226
flutter_profile : development-linux-x86_64
@@ -317,96 +317,143 @@ jobs:
317
317
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
318
318
sudo apt-get install network-manager
319
319
docker ps -a
320
- flutter test integration_test/cloud/cloud_runner.dart -d Linux --coverage
320
+ flutter test integration_test/cloud/cloud_runner.dart -d Linux --coverage --reporter=github
321
321
shell : bash
322
322
323
323
# split the integration tests into different machines to minimize the time
324
324
integration_test_1 :
325
- needs : [ prepare-linux ]
325
+ needs : [prepare-linux]
326
326
if : github.event.pull_request.draft != true
327
327
strategy :
328
328
fail-fast : false
329
329
matrix :
330
- os : [ ubuntu-latest ]
330
+ os : [ubuntu-latest]
331
+ shard : [1, 2, 3, 4]
331
332
include :
332
333
- os : ubuntu-latest
333
- target : ' x86_64-unknown-linux-gnu'
334
+ target : " x86_64-unknown-linux-gnu"
334
335
runs-on : ${{ matrix.os }}
335
336
steps :
336
337
- name : Checkout source code
337
338
uses : actions/checkout@v4
338
339
339
- - name : Install video dependency
340
- run : |
341
- sudo apt-get update
342
- sudo apt-get -y install libmpv-dev mpv
343
- shell : bash
340
+ - name : Install Rust toolchain
341
+ id : rust_toolchain
342
+ uses : actions-rs/toolchain@v1
343
+ with :
344
+ toolchain : ${{ env.RUST_TOOLCHAIN }}
345
+ target : ${{ matrix.target }}
346
+ override : true
347
+ profile : minimal
344
348
345
- - name : Flutter Integration Test 1
346
- uses : ./.github/actions/flutter_integration_test
349
+ - name : Install flutter
350
+ id : flutter
351
+ uses : subosito/flutter-action@v2
347
352
with :
348
- test_path : integration_test/desktop_runner_1.dart
349
- flutter_version : ${{ env.FLUTTER_VERSION }}
350
- rust_toolchain : ${{ env.RUST_TOOLCHAIN }}
351
- cargo_make_version : ${{ env.CARGO_MAKE_VERSION }}
352
- rust_target : ${{ matrix.target }}
353
+ channel : " stable"
354
+ flutter-version : ${{ env.FLUTTER_VERSION }}
355
+ cache : true
353
356
354
- integration_test_2 :
355
- needs : [ prepare-linux ]
356
- if : github.event.pull_request.draft != true
357
- strategy :
358
- fail-fast : false
359
- matrix :
360
- os : [ ubuntu-latest ]
361
- include :
362
- - os : ubuntu-latest
363
- target : ' x86_64-unknown-linux-gnu'
364
- runs-on : ${{ matrix.os }}
365
- steps :
366
- - name : Checkout source code
367
- uses : actions/checkout@v4
357
+ - uses : taiki-e/install-action@v2
358
+ with :
359
+ tool : cargo-make@${{ env.CARGO_MAKE_VERSION }}
368
360
369
- - name : Install video dependency
361
+ - name : Install prerequisites
362
+ working-directory : frontend
370
363
run : |
364
+ sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
365
+ sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
371
366
sudo apt-get update
372
- sudo apt-get -y install libmpv-dev mpv
367
+ sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev network-manager libmpv-dev mpv
373
368
shell : bash
374
369
375
- - name : Flutter Integration Test 2
376
- uses : ./.github/actions/flutter_integration_test
370
+ - name : Enable Flutter Desktop
371
+ run : |
372
+ flutter config --enable-linux-desktop
373
+ shell : bash
374
+
375
+ - uses : actions/download-artifact@v4
377
376
with :
378
- test_path : integration_test/desktop_runner_2.dart
379
- flutter_version : ${{ env.FLUTTER_VERSION }}
380
- rust_toolchain : ${{ env.RUST_TOOLCHAIN }}
381
- cargo_make_version : ${{ env.CARGO_MAKE_VERSION }}
382
- rust_target : ${{ matrix.target }}
377
+ name : ${{ github.run_id }}-ubuntu-latest
383
378
384
- integration_test_3 :
385
- needs : [ prepare-linux ]
386
- if : github.event.pull_request.draft != true
387
- strategy :
388
- fail-fast : false
389
- matrix :
390
- os : [ ubuntu-latest ]
391
- include :
392
- - os : ubuntu-latest
393
- target : ' x86_64-unknown-linux-gnu'
394
- runs-on : ${{ matrix.os }}
395
- steps :
396
- - name : Checkout source code
397
- uses : actions/checkout@v4
379
+ - name : Uncompressed appflowy_flutter
380
+ run : tar -xf appflowy_flutter.tar.gz
381
+ shell : bash
398
382
399
- - name : Install video dependency
383
+ - name : Run Flutter integration tests
384
+ working-directory : frontend/appflowy_flutter
400
385
run : |
401
- sudo apt-get update
402
- sudo apt-get -y install libmpv-dev mpv
386
+ export DISPLAY=:99
387
+ sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
388
+ sudo apt-get install network-manager
389
+ flutter test integration_test -d Linux --coverage --shard-index=${{ matrix.shard }} --total-shards=4
403
390
shell : bash
404
391
405
- - name : Flutter Integration Test 3
406
- uses : ./.github/actions/flutter_integration_test
407
- with :
408
- test_path : integration_test/desktop_runner_3.dart
409
- flutter_version : ${{ env.FLUTTER_VERSION }}
410
- rust_toolchain : ${{ env.RUST_TOOLCHAIN }}
411
- cargo_make_version : ${{ env.CARGO_MAKE_VERSION }}
412
- rust_target : ${{ matrix.target }}
392
+ # - name: Flutter Integration Test 1
393
+ # uses: ./.github/actions/flutter_integration_test
394
+ # with:
395
+ # test_path: integration_test/desktop_runner_1.dart
396
+ # flutter_version: ${{ env.FLUTTER_VERSION }}
397
+ # rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
398
+ # cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
399
+ # rust_target: ${{ matrix.target }}
400
+
401
+ # integration_test_2:
402
+ # needs: [prepare-linux]
403
+ # if: github.event.pull_request.draft != true
404
+ # strategy:
405
+ # fail-fast: false
406
+ # matrix:
407
+ # os: [ubuntu-latest]
408
+ # include:
409
+ # - os: ubuntu-latest
410
+ # target: "x86_64-unknown-linux-gnu"
411
+ # runs-on: ${{ matrix.os }}
412
+ # steps:
413
+ # - name: Checkout source code
414
+ # uses: actions/checkout@v4
415
+
416
+ # - name: Install video dependency
417
+ # run: |
418
+ # sudo apt-get update
419
+ # sudo apt-get -y install libmpv-dev mpv
420
+ # shell: bash
421
+
422
+ # - name: Flutter Integration Test 2
423
+ # uses: ./.github/actions/flutter_integration_test
424
+ # with:
425
+ # test_path: integration_test/desktop_runner_2.dart
426
+ # flutter_version: ${{ env.FLUTTER_VERSION }}
427
+ # rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
428
+ # cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
429
+ # rust_target: ${{ matrix.target }}
430
+
431
+ # integration_test_3:
432
+ # needs: [prepare-linux]
433
+ # if: github.event.pull_request.draft != true
434
+ # strategy:
435
+ # fail-fast: false
436
+ # matrix:
437
+ # os: [ubuntu-latest]
438
+ # include:
439
+ # - os: ubuntu-latest
440
+ # target: "x86_64-unknown-linux-gnu"
441
+ # runs-on: ${{ matrix.os }}
442
+ # steps:
443
+ # - name: Checkout source code
444
+ # uses: actions/checkout@v4
445
+
446
+ # - name: Install video dependency
447
+ # run: |
448
+ # sudo apt-get update
449
+ # sudo apt-get -y install libmpv-dev mpv
450
+ # shell: bash
451
+
452
+ # - name: Flutter Integration Test 3
453
+ # uses: ./.github/actions/flutter_integration_test
454
+ # with:
455
+ # test_path: integration_test/desktop_runner_3.dart
456
+ # flutter_version: ${{ env.FLUTTER_VERSION }}
457
+ # rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
458
+ # cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
459
+ # rust_target: ${{ matrix.target }}
0 commit comments