From d892e1e44f0f415d2f5e9ac7fe54f3209fa2e0bf Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Sun, 22 Dec 2024 14:21:27 -0500 Subject: [PATCH] CI: Don't run unrelated workflows (#37) - Add `paths` to the workflows to prevent them from being run for no reason. - Rename `Memory Check` to `Memory Leaks`. - Give job names something more specific so I can use them in status checks. --- .../workflows/{memory_check.yml => memory_leak.yml} | 10 ++++++++-- .github/workflows/tests.yml | 10 +++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) rename .github/workflows/{memory_check.yml => memory_leak.yml} (85%) diff --git a/.github/workflows/memory_check.yml b/.github/workflows/memory_leak.yml similarity index 85% rename from .github/workflows/memory_check.yml rename to .github/workflows/memory_leak.yml index f872d5b..d087f07 100644 --- a/.github/workflows/memory_check.yml +++ b/.github/workflows/memory_leak.yml @@ -1,12 +1,18 @@ -name: Memory Check +name: Memory Leaks on: push: branches: - master + paths: + - 'src/**' + - '.github/workflows/memory_leak.yml' pull_request: branches: - master + paths: + - 'src/**' + - '.github/workflows/memory_leak.yml' env: PYTHONUNBUFFERED: "1" @@ -14,7 +20,7 @@ env: PYTHONIOENCODING: "utf8" jobs: - run: + memory-leaks: name: Check for memory leaks and errors runs-on: ubuntu-latest diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fbbe059..30d79b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,9 +4,17 @@ on: push: branches: - master + paths: + - 'tests/**' + - 'src/**' + - '.github/workflows/tests.yml' pull_request: branches: - master + paths: + - 'tests/**' + - 'src/**' + - '.github/workflows/tests.yml' concurrency: group: test-${{ github.head_ref }} @@ -18,7 +26,7 @@ env: PYTHONIOENCODING: "utf8" jobs: - run: + run-tests: name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} runs-on: ${{ matrix.os }} strategy: