ci: run actions when specified files changed.

This commit is contained in:
appflowy 2022-02-20 07:22:39 +08:00
parent 860ebc567b
commit 7d93ed8e81
3 changed files with 15 additions and 13 deletions

View File

@ -8,9 +8,12 @@ name: Flutter lint
on:
push:
branches: [ main ]
paths:
- 'frontend/app_flowy'
pull_request:
branches: [ main ]
paths:
- 'frontend/app_flowy'
env:
CARGO_TERM_COLOR: always
@ -25,10 +28,10 @@ jobs:
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Flutter pub get
- name: Deps Flutter
run: flutter pub get
working-directory: frontend/app_flowy
- name: Generate language files
- name: Code Generate
working-directory: frontend/app_flowy
run:
flutter pub run easy_localization:generate --source-dir ./assets/translations -f keys -O lib/generated -o locale_keys.g.dart

View File

@ -6,7 +6,6 @@ on:
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
@ -41,7 +40,7 @@ jobs:
run: |
flutter config --enable-linux-desktop
cargo make --profile development-linux-x86 flowy-sdk-dev
- name: Bloc Test
- name: Run bloc tests
working-directory: frontend/app_flowy
run: |
flutter test

View File

@ -3,14 +3,14 @@ name: Unit test(Rust)
on:
push:
branches: [ main ]
# paths:
# - 'frontend/rust-lib'
# - 'shared-lib'
paths:
- 'frontend/rust-lib'
- 'shared-lib'
pull_request:
branches: [ main ]
# paths:
# - 'frontend/rust-lib'
# - 'shared-lib'
paths:
- 'frontend/rust-lib'
- 'shared-lib'
env:
CARGO_TERM_COLOR: always
@ -31,9 +31,9 @@ jobs:
- name: Install cargo-make
run: cargo install --force cargo-make
working-directory: frontend
- name: RustLib tests
- name: Run rust-lib tests
run: cargo test --no-default-features
working-directory: frontend/rust-lib
- name: Sharedlib tests
- name: Run shared-lib tests
run: cargo test --no-default-features
working-directory: shared-lib