summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorcyqsimon <28627918+cyqsimon@users.noreply.github.com>2023-08-31 21:58:32 +0800
committercyqsimon <28627918+cyqsimon@users.noreply.github.com>2023-08-31 21:58:32 +0800
commite1bdc4c47518c988746ce318895d952ae06b4385 (patch)
tree26ba2ce26bd0a9784e620ca27c2bdd255ac03fef /.github
parent0cf79b2fbd6688f9e04da9ba2c8c0bc005a8e92b (diff)
Disable tests on Windows for PRs
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml6
1 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index a2d3748..3e12c46 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -52,7 +52,8 @@ jobs:
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Install npcap on Windows
- if: matrix.os == 'windows-latest'
+ # PRs cannot not be trusted with repository secrets
+ if: (matrix.os == 'windows-latest') && (github.event_name != 'pull_request')
env:
NPCAP_OEM_URL: ${{ secrets.NPCAP_OEM_URL }}
run: |
@@ -62,6 +63,9 @@ jobs:
& "$env:TEMP/npcap-oem.exe" /S
- name: Run tests
+ # npcap is needed to run tests on Windows, so this is an unfortunate
+ # sacrifice we have to make in the name of security
+ if: (matrix.os != 'windows-latest') || (github.event_name != 'pull_request')
run: cargo test --verbose
- name: Upload unix binary