Skip to content

Commit bfc0070

Browse files
authored
ci: leverage paths-filter to only test changed packages (#292)
* leverage paths-filter to only test changed packages Signed-off-by: gruebel <[email protected]> * testing flipt Signed-off-by: gruebel <[email protected]> --------- Signed-off-by: gruebel <[email protected]>
1 parent 3213e92 commit bfc0070

File tree

5 files changed

+31
-37
lines changed

5 files changed

+31
-37
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,36 @@ permissions:
2121
contents: read
2222

2323
jobs:
24+
changes:
25+
runs-on: ubuntu-latest
26+
permissions:
27+
pull-requests: read # needed for `dorny/paths-filter`
28+
outputs:
29+
packages: ${{ steps.filter.outputs.changes }}
30+
steps:
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
32+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
33+
id: filter
34+
with:
35+
filters: |
36+
hooks/openfeature-hooks-opentelemetry:
37+
- 'hooks/openfeature-hooks-opentelemetry/**'
38+
providers/openfeature-provider-env-var:
39+
- 'providers/openfeature-provider-env-var/**'
40+
providers/providers/openfeature-provider-flagd:
41+
- 'providers/providers/openfeature-provider-flagd/**'
42+
providers/openfeature-provider-flipt:
43+
- 'providers/openfeature-provider-flipt/**'
44+
providers/openfeature-provider-ofrep:
45+
- 'providers/openfeature-provider-ofrep/**'
46+
2447
build:
48+
needs: changes
2549
runs-on: ubuntu-latest
2650
strategy:
2751
matrix:
2852
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
29-
package:
30-
- "hooks/openfeature-hooks-opentelemetry"
31-
- "providers/openfeature-provider-flagd"
32-
- "providers/openfeature-provider-ofrep"
33-
- "providers/openfeature-provider-env-var"
34-
53+
package: ${{ fromJSON(needs.changes.outputs.packages) }}
3554
steps:
3655
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3756
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
- repo: https://github.com/astral-sh/ruff-pre-commit
44
rev: v0.12.4
55
hooks:
6-
- id: ruff
6+
- id: ruff-check
77
args: [--fix]
88
- id: ruff-format
99

providers/openfeature-provider-env-var/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ build-backend = "hatchling.build"
1717
dev = [
1818
"pytest>=8.3.5",
1919
"pytest-cov>=6.1.1",
20-
"ruff>=0.11.7",
2120
]
2221

2322
[tool.hatch.build.targets.wheel]
@@ -35,6 +34,9 @@ run = "mypy"
3534
[tool.hatch.envs.mypy]
3635
dependencies = ["mypy"]
3736

37+
[tool.uv]
38+
required-version = "~=0.8.0"
39+
3840
[tool.mypy]
3941
mypy_path = "src"
4042
files = "src"

providers/openfeature-provider-env-var/uv.lock

Lines changed: 1 addition & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

providers/openfeature-provider-flipt/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Homepage = "https://github.com/open-feature/python-sdk-contrib"
3030
[tool.hatch.envs.hatch-test]
3131
dependencies = [
3232
"coverage[toml]>=6.5",
33-
"pytest",
33+
"pytest>=8.0",
3434
"requests-mock",
3535
]
3636

0 commit comments

Comments
 (0)