Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
permissions:
contents: read

env:
PREK_VERSION: '0.3.x'
TARGET_PYTHON_VERSION: "3.14"

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,7 +47,7 @@ jobs:
- name: Run E2E tests with behave
run: poe e2e

- if: matrix.python-version == '3.13'
- if: matrix.python-version == env.TARGET_PYTHON_VERSION
name: Upload coverage to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
Expand All @@ -61,13 +65,12 @@ jobs:
- name: Install uv and set the python version
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7
with:
python-version: "3.13"

- name: Install dependencies
run: uv sync --frozen

- name: Run pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
python-version: ${{ env.TARGET_PYTHON_VERSION }}
ignore-nothing-to-cache: true
- name: Run prek
uses: j178/prek-action@79f765515bd648eb4d6bb1b17277b7cb22cb6468 # v2.0.0
with:
prek-version: ${{ env.PREK_VERSION }}

sast:
runs-on: ubuntu-latest
Expand All @@ -80,7 +83,7 @@ jobs:
- name: Install uv and set the python version
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7
with:
python-version: "3.13"
python-version: ${{ env.TARGET_PYTHON_VERSION }}
ignore-nothing-to-cache: true

- name: Initialize CodeQL
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
permissions: # added using https://github.com/step-security/secure-workflows
contents: read

env:
TARGET_PYTHON_VERSION: "3.14"

jobs:
release-please:
permissions:
Expand Down Expand Up @@ -47,7 +50,7 @@ jobs:
- name: Install uv and set the python version
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7
with:
python-version: "3.13"
python-version: ${{ env.TARGET_PYTHON_VERSION }}

- name: Install dependencies
run: uv sync --frozen
Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
default_stages: [pre-commit]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.6
rev: v0.15.7
hooks:
- id: ruff-check
priority: 1
args: [--fix]
- id: ruff-format
priority: 0

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-toml
priority: 0
- id: check-yaml
priority: 0
- id: trailing-whitespace
priority: 0
- id: check-merge-conflict
priority: 0

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.18.1
rev: v2.20.0
hooks:
- id: pyproject-fmt
priority: 0

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
priority: 1
files: openfeature|tests/typechecking
22 changes: 11 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dev = [
"behave>=1.3.0,<2.0.0",
"coverage[toml]>=7.10.0,<8.0.0",
"poethepoet>=0.40.0,<1.0.0",
"pre-commit",
"prek>=0.3.0,<0.4.0",
"pytest>=9.0.0,<10.0.0",
"pytest-asyncio>=1.3.0,<2.0.0",
]
Expand Down Expand Up @@ -103,16 +103,6 @@ lint.pyupgrade.keep-runtime-typing = true
keep_full_version = true
max_supported_python = "3.14"

[tool.pytest]
strict = true
asyncio_default_fixture_loop_scope = "function"

[tool.coverage]
report.exclude_also = [
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
]

[tool.mypy]
files = "openfeature,tests/typechecking"
python_version = "3.10" # should be identical to the minimum supported version
Expand All @@ -125,6 +115,16 @@ pretty = true
strict = true
disallow_any_generics = false

[tool.pytest]
strict = true
asyncio_default_fixture_loop_scope = "function"

[tool.coverage]
report.exclude_also = [
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
]

[tool.poe]
executor = "uv"
tasks.test = "pytest tests"
Expand Down
Loading
Loading