Skip to content

Commit

Permalink
CI: Don't run unrelated workflows (#37)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
ZeroIntensity authored Dec 22, 2024
1 parent 38ac00f commit d892e1e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
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"
FORCE_COLOR: "1"
PYTHONIOENCODING: "utf8"

jobs:
run:
memory-leaks:
name: Check for memory leaks and errors
runs-on: ubuntu-latest

Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down

0 comments on commit d892e1e

Please sign in to comment.