Skip to content

Commit 387fd5c

Browse files
committed
feat: speed up flutter ci
1 parent 9b7d38b commit 387fd5c

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

.github/actions/flutter_integration_test/action.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ runs:
2525
- name: Checkout source code
2626
uses: actions/checkout@v4
2727

28+
- name: Cache Rust dependencies
29+
uses: actions/cache@v3
30+
with:
31+
path: |
32+
~/.cargo/registry
33+
~/.cargo/git
34+
target
35+
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-rust-
38+
2839
- name: Install Rust toolchain
2940
id: rust_toolchain
3041
uses: actions-rs/toolchain@v1
@@ -42,22 +53,27 @@ runs:
4253
flutter-version: ${{ inputs.flutter_version }}
4354
cache: true
4455

45-
- uses: taiki-e/install-action@v2
56+
- name: Cache Flutter dependencies
57+
uses: actions/cache@v3
58+
with:
59+
path: ${{ env.PUB_CACHE }}
60+
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
61+
restore-keys: |
62+
${{ runner.os }}-pub-
63+
64+
- name: Install cargo-make
65+
uses: taiki-e/install-action@v2
4666
with:
4767
tool: cargo-make@${{ inputs.cargo_make_version }}
4868

49-
- name: Install prerequisites
50-
working-directory: frontend
69+
- name: Install system dependencies
5170
run: |
52-
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
53-
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
5471
sudo apt-get update
55-
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
72+
sudo apt-get install -y curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev network-manager libmpv-dev mpv
5673
shell: bash
5774

5875
- name: Enable Flutter Desktop
59-
run: |
60-
flutter config --enable-linux-desktop
76+
run: flutter config --enable-linux-desktop
6177
shell: bash
6278

6379
- uses: actions/download-artifact@v4
@@ -73,6 +89,5 @@ runs:
7389
run: |
7490
export DISPLAY=:99
7591
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
76-
sudo apt-get install network-manager
7792
flutter test ${{ inputs.test_path }} -d Linux --coverage
78-
shell: bash
93+
shell: bash

frontend/appflowy_flutter/pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,10 +1559,10 @@ packages:
15591559
dependency: transitive
15601560
description:
15611561
name: platform
1562-
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
1562+
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
15631563
url: "https://pub.dev"
15641564
source: hosted
1565-
version: "3.1.4"
1565+
version: "3.1.5"
15661566
plugin_platform_interface:
15671567
dependency: "direct dev"
15681568
description:
@@ -1989,10 +1989,10 @@ packages:
19891989
dependency: transitive
19901990
description:
19911991
name: string_scanner
1992-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
1992+
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
19931993
url: "https://pub.dev"
19941994
source: hosted
1995-
version: "1.2.0"
1995+
version: "1.3.0"
19961996
string_validator:
19971997
dependency: "direct main"
19981998
description:
@@ -2311,10 +2311,10 @@ packages:
23112311
dependency: transitive
23122312
description:
23132313
name: vm_service
2314-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
2314+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
23152315
url: "https://pub.dev"
23162316
source: hosted
2317-
version: "14.2.1"
2317+
version: "14.2.5"
23182318
watcher:
23192319
dependency: transitive
23202320
description:

0 commit comments

Comments
 (0)