浏览代码

ci: use filtering for all

Jonathan Kelley 3 年之前
父节点
当前提交
a858934d41
共有 2 个文件被更改,包括 23 次插入4 次删除
  1. 13 2
      .github/workflows/macos.yml
  2. 10 2
      .github/workflows/windows.yml

+ 13 - 2
.github/workflows/macos.yml

@@ -1,7 +1,18 @@
-on: [push, pull_request]
-
 name: macOS tests
 
+on:
+  push:
+    paths:
+      - packages/**
+      - examples/**
+      - src/**
+      - .github/**
+      - lib.rs
+      - Cargo.toml
+  pull_request:
+    branches:
+      - master
+
 jobs:
   test:
     name: Test Suite

+ 10 - 2
.github/workflows/windows.yml

@@ -1,9 +1,17 @@
 name: windows
+
 on:
   push:
+    paths:
+      - packages/**
+      - examples/**
+      - src/**
+      - .github/**
+      - lib.rs
+      - Cargo.toml
+  pull_request:
     branches:
       - master
-  pull_request:
 
 jobs:
   test:
@@ -50,7 +58,7 @@ jobs:
         run: |
           rustc -Vv
           cargo -V
-          set RUST_BACKTRACE=1 
+          set RUST_BACKTRACE=1
           cargo build --features "desktop, ssr, router"
           cargo test --features "desktop, ssr, router"
         shell: cmd