Skip to content

Commit d892e1e

Browse files
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.
1 parent 38ac00f commit d892e1e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
name: Memory Check
1+
name: Memory Leaks
22

33
on:
44
push:
55
branches:
66
- master
7+
paths:
8+
- 'src/**'
9+
- '.github/workflows/memory_leak.yml'
710
pull_request:
811
branches:
912
- master
13+
paths:
14+
- 'src/**'
15+
- '.github/workflows/memory_leak.yml'
1016

1117
env:
1218
PYTHONUNBUFFERED: "1"
1319
FORCE_COLOR: "1"
1420
PYTHONIOENCODING: "utf8"
1521

1622
jobs:
17-
run:
23+
memory-leaks:
1824
name: Check for memory leaks and errors
1925
runs-on: ubuntu-latest
2026

.github/workflows/tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ on:
44
push:
55
branches:
66
- master
7+
paths:
8+
- 'tests/**'
9+
- 'src/**'
10+
- '.github/workflows/tests.yml'
711
pull_request:
812
branches:
913
- master
14+
paths:
15+
- 'tests/**'
16+
- 'src/**'
17+
- '.github/workflows/tests.yml'
1018

1119
concurrency:
1220
group: test-${{ github.head_ref }}
@@ -18,7 +26,7 @@ env:
1826
PYTHONIOENCODING: "utf8"
1927

2028
jobs:
21-
run:
29+
run-tests:
2230
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
2331
runs-on: ${{ matrix.os }}
2432
strategy:

0 commit comments

Comments
 (0)