From 62813bd4b1e36ca71928af528216b3be73d3779f Mon Sep 17 00:00:00 2001 From: Bodong Yang Date: Thu, 9 May 2024 02:35:01 +0000 Subject: [PATCH] test_ci: only trigger test CI on pr or push to main branch with src or tests changed, allow manually trigger --- .github/workflows/test.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fde4898..099661b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,24 @@ name: test CI -on: [pull_request] +on: + pull_request: + branches: + - main + # only trigger unit test CI when src or tests changed + paths: + - "src/**" + - "tests/**" + - ".github/workflows/test.yaml" + push: + branches: + - main + # only trigger unit test CI when src or tests changed + paths: + - "src/**" + - "tests/**" + - ".github/workflows/test.yaml" + # allow the test CI to be manually triggerred + workflow_dispatch: jobs: pytest_with_coverage_on_supported_os: