Skip to content

Commit c29d1d0

Browse files
committed
feat: add new windows tests
1 parent 39354ae commit c29d1d0

File tree

2 files changed

+116
-26
lines changed

2 files changed

+116
-26
lines changed

.github/workflows/flutter_ci.yaml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -365,32 +365,6 @@ jobs:
365365
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
366366
rust_target: ${{ matrix.target }}
367367

368-
windows_integration_test:
369-
needs: [prepare-windows]
370-
if: github.event.pull_request.draft != true
371-
strategy:
372-
fail-fast: false
373-
matrix:
374-
os: [windows-latest]
375-
test_number: [1, 2, 3, 4, 5, 6, 7, 8, 9]
376-
include:
377-
- os: windows-latest
378-
target: "x86_64-pc-windows-msvc"
379-
runs-on: ${{ matrix.os }}
380-
steps:
381-
- name: Checkout source code
382-
uses: actions/checkout@v4
383-
384-
- name: Flutter Integration Test ${{ matrix.test_number }}
385-
uses: ./.github/actions/flutter_integration_test
386-
with:
387-
os: ${{ matrix.os }}
388-
test_path: integration_test/desktop_runner_${{ matrix.test_number }}.dart
389-
flutter_version: ${{ env.FLUTTER_VERSION }}
390-
rust_toolchain: ${{ env.RUST_TOOLCHAIN }}
391-
cargo_make_version: ${{ env.CARGO_MAKE_VERSION }}
392-
rust_target: ${{ matrix.target }}
393-
394368
macos_integration_test:
395369
needs: [prepare-macos]
396370
if: github.event.pull_request.draft != true
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Windows Tests (Flutter)
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
- "release/*"
8+
paths:
9+
- ".github/workflows/flutter_ci.yaml"
10+
- ".github/actions/flutter_build/**"
11+
- "frontend/rust-lib/**"
12+
- "frontend/appflowy_flutter/**"
13+
- "frontend/resources/**"
14+
15+
pull_request:
16+
branches:
17+
- "main"
18+
- "release/*"
19+
paths:
20+
- ".github/workflows/flutter_ci.yaml"
21+
- ".github/actions/flutter_build/**"
22+
- "frontend/rust-lib/**"
23+
- "frontend/appflowy_flutter/**"
24+
- "frontend/resources/**"
25+
26+
env:
27+
CARGO_TERM_COLOR: always
28+
FLUTTER_VERSION: "3.27.4"
29+
RUST_TOOLCHAIN: "1.81.0"
30+
CARGO_MAKE_VERSION: "0.37.18"
31+
CLOUD_VERSION: 0.6.54-amd64
32+
33+
concurrency:
34+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
35+
cancel-in-progress: true
36+
37+
jobs:
38+
windows_tests:
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
os: [windows-latest]
43+
include:
44+
- os: windows-latest
45+
flutter_profile: development-windows-x86
46+
target: x86_64-pc-windows-msvc
47+
48+
runs-on: ${{ matrix.os }}
49+
50+
steps:
51+
- name: Checkout source code
52+
uses: actions/checkout@v4
53+
54+
- name: Install Rust toolchain
55+
id: rust_toolchain
56+
uses: actions-rs/toolchain@v1
57+
with:
58+
toolchain: ${{ env.RUST_TOOLCHAIN }}
59+
target: ${{ matrix.target }}
60+
override: true
61+
profile: minimal
62+
63+
- name: Install flutter
64+
id: flutter
65+
uses: subosito/flutter-action@v2
66+
with:
67+
channel: "stable"
68+
flutter-version: ${{ env.FLUTTER_VERSION }}
69+
cache: true
70+
71+
- uses: Swatinem/rust-cache@v2
72+
with:
73+
prefix-key: ${{ matrix.os }}
74+
workspaces: |
75+
frontend/rust-lib
76+
cache-all-crates: true
77+
78+
- uses: taiki-e/install-action@v2
79+
with:
80+
tool: cargo-make@${{ env.CARGO_MAKE_VERSION }}, duckscript_cli
81+
82+
- name: Install prerequisites
83+
working-directory: frontend
84+
shell: bash
85+
run: |
86+
vcpkg integrate install
87+
vcpkg update
88+
cargo make appflowy-flutter-deps-tools
89+
90+
- name: Build AppFlowy
91+
working-directory: frontend
92+
run: cargo make --profile ${{ matrix.flutter_profile }} appflowy-core-dev
93+
shell: bash
94+
95+
- name: Run code generation
96+
working-directory: frontend
97+
run: cargo make code_generation
98+
shell: bash
99+
100+
- name: Flutter Analyzer
101+
working-directory: frontend/appflowy_flutter
102+
run: flutter analyze .
103+
shell: bash
104+
105+
- name: Run Flutter unit tests
106+
env:
107+
DISABLE_EVENT_LOG: true
108+
DISABLE_CI_TEST_LOG: "true"
109+
working-directory: frontend
110+
run: cargo make dart_unit_test_no_build
111+
shell: bash
112+
113+
- name: Run Flutter integration tests
114+
working-directory: frontend
115+
run: flutter test integration_test/runner.dart -d Windows --coverage
116+
shell: bash

0 commit comments

Comments
 (0)