Browse Source

chore: set paths in github actions to reduce the ci time

Lucas.Xu 2 years ago
parent
commit
d2c118ad02

+ 9 - 2
.github/workflows/dart_lint.yml

@@ -7,9 +7,16 @@ name: Flutter lint
 
 
 on:
 on:
   push:
   push:
-    branches: [main]
+    branches:
+      - "main"
+    paths:
+      - "frontend/app_flowy/**"
+
   pull_request:
   pull_request:
-    branches: [main]
+    branches:
+      - "main"
+    paths:
+      - "frontend/app_flowy/**"
 
 
 env:
 env:
   CARGO_TERM_COLOR: always
   CARGO_TERM_COLOR: always

+ 4 - 1
.github/workflows/dart_test.yml

@@ -4,11 +4,14 @@ on:
   push:
   push:
     branches:
     branches:
       - "main"
       - "main"
+    paths:
+      - "frontend/app_flowy/**"
 
 
   pull_request:
   pull_request:
     branches:
     branches:
       - "main"
       - "main"
-      - "feat/flowy_editor"
+    paths:
+      - "frontend/app_flowy/**"
 
 
 env:
 env:
   CARGO_TERM_COLOR: always
   CARGO_TERM_COLOR: always

+ 11 - 3
.github/workflows/rust_lint.yml

@@ -2,10 +2,18 @@ name: Rust lint
 
 
 on:
 on:
   push:
   push:
-    branches: [ main ]
-  pull_request:
-    branches: [ main ]
+    branches:
+      - "main"
+    paths:
+      - "frontend/rust-lib/**"
+      - "shared-lib/**"
 
 
+  pull_request:
+    branches:
+      - "main"
+    paths:
+      - "frontend/rust-lib/**"
+      - "shared-lib/**"
 
 
 env:
 env:
   CARGO_TERM_COLOR: always
   CARGO_TERM_COLOR: always

+ 11 - 4
.github/workflows/rust_test.yml

@@ -2,11 +2,18 @@ name: Unit test(Rust)
 
 
 on:
 on:
   push:
   push:
-    branches: 
-      - 'main'
+    branches:
+      - "main"
+    paths:
+      - "frontend/rust-lib/**"
+      - "shared-lib/**"
+
   pull_request:
   pull_request:
-    branches: 
-      - 'main'
+    branches:
+      - "main"
+    paths:
+      - "frontend/rust-lib/**"
+      - "shared-lib/**"
 
 
 env:
 env:
   CARGO_TERM_COLOR: always
   CARGO_TERM_COLOR: always