From 77d26f27ffdd47f912ff890159edfc9ce1ba3169 Mon Sep 17 00:00:00 2001 From: F-park <52167622+F-park@users.noreply.github.com> Date: Tue, 23 Jan 2024 14:26:42 +0800 Subject: [PATCH] Add path to limit CI execution on certain path changes (#398) --- .github/workflows/docs.yml | 6 ++++++ .github/workflows/python-package.yml | 18 +++++++++--------- .github/workflows/wheels.yml | 6 ++++++ 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f0c3efe9..a19cc3de 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,13 @@ name: docs on: push: branches: [ master ] + paths: + - "docs/**" + - ".github/workflows/docs.yml" pull_request: + paths: + - "docs/**" + - ".github/workflows/docs.yml" jobs: docs: diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7d5ed8d9..16097d25 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -6,9 +6,15 @@ name: build on: push: branches: [ master ] + paths: + - "src/viztracer/**" + - "tests/**" + - ".github/workflows/python-package.yml" pull_request: - schedule: - - cron: '0 10 * * *' + paths: + - "src/viztracer/**" + - "tests/**" + - ".github/workflows/python-package.yml" jobs: build: @@ -36,15 +42,9 @@ jobs: with: xcode-version: latest-stable - name: Install dependencies - if: matrix.os != 'windows-latest' - run: | - python -m pip install --upgrade pip - if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi - - name: Install dependencies on Windows - if: matrix.os == 'windows-latest' run: | python -m pip install --upgrade pip - if (Test-Path -Path '.\requirements-dev.txt' -PathType Leaf) {pip install -r requirements-dev.txt} + pip install -r requirements-dev.txt - name: Build dist and test with unittest if: matrix.os != 'windows-latest' run: | diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index bcb471df..e04be324 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -3,7 +3,13 @@ name: wheels on: push: branches: [ master ] + paths: + - "src/viztracer/**" + - ".github/workflows/wheels.yml" pull_request: + paths: + - "src/viztracer/**" + - ".github/workflows/wheels.yml" jobs: build-wheels-linux: