From 02bc2b3e7e8437dc325f0b0f12d34ffdfb6bcbae Mon Sep 17 00:00:00 2001 From: sidmohan0 <61345237+sidmohan0@users.noreply.github.com> Date: Tue, 26 May 2026 19:05:12 +0200 Subject: [PATCH] ci: upgrade actions for Node 24 runtime Refs DFPY-67 --- .github/workflows/benchmark.yml | 8 ++++---- .github/workflows/ci.yml | 18 +++++++++--------- .github/workflows/release.yml | 28 ++++++++++++++-------------- setup.py | 2 ++ tests/test_install_profiles.py | 3 +++ 5 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e0bc7d5c..bcc51e1b 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -13,12 +13,12 @@ jobs: benchmark: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 # Fetch all history for proper comparison - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.10" cache: "pip" @@ -34,7 +34,7 @@ jobs: python -m pytest --collect-only tests/benchmark_text_service.py::test_regex_performance - name: Restore benchmark data - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: .benchmarks # Updated cache key to reset baseline due to performance optimization changes @@ -101,7 +101,7 @@ jobs: # fi - name: Upload benchmark results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: benchmark-results path: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3020390..bc1f4b02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: "3.10" cache: "pip" @@ -40,9 +40,9 @@ jobs: - python-version: "3.13" install-profile: "nlp-advanced" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: "pip" @@ -148,7 +148,7 @@ jobs: PY - name: Upload coverage - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: files: ./coverage.xml flags: ${{ matrix.install-profile }}-py${{ matrix.python-version }} @@ -168,9 +168,9 @@ jobs: - distributed - web steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" cache: "pip" @@ -198,8 +198,8 @@ jobs: wheel-size: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 with: python-version: "3.10" cache: "pip" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91a459aa..a2d5a95c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,11 +61,11 @@ jobs: BRANCH="dev" fi - echo "release_type=$TYPE" >> $GITHUB_OUTPUT - echo "target_branch=$BRANCH" >> $GITHUB_OUTPUT + echo "release_type=$TYPE" >> "$GITHUB_OUTPUT" + echo "target_branch=$BRANCH" >> "$GITHUB_OUTPUT" echo "Release type: $TYPE from $BRANCH" - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 ref: ${{ steps.resolve.outputs.target_branch }} @@ -86,15 +86,15 @@ jobs: if [ -z "$LAST_TAG" ]; then COMMIT_COUNT=$(git rev-list --count --since="7 days ago" HEAD) else - COMMIT_COUNT=$(git rev-list --count ${LAST_TAG}..HEAD) + COMMIT_COUNT=$(git rev-list --count "${LAST_TAG}..HEAD") fi echo "Commits since ${LAST_TAG:-'(none)'}: $COMMIT_COUNT" if [ "$COMMIT_COUNT" -gt 0 ] || [ "${{ inputs.force_build }}" = "true" ]; then - echo "has_changes=true" >> $GITHUB_OUTPUT + echo "has_changes=true" >> "$GITHUB_OUTPUT" else - echo "has_changes=false" >> $GITHUB_OUTPUT + echo "has_changes=false" >> "$GITHUB_OUTPUT" echo "No changes detected, skipping release" fi @@ -107,13 +107,13 @@ jobs: matrix: python-version: ["3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 ref: ${{ needs.determine-release.outputs.target_branch }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: "pip" @@ -145,13 +145,13 @@ jobs: if: needs.determine-release.outputs.has_changes == 'true' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 ref: ${{ needs.determine-release.outputs.target_branch }} - name: Set up Python 3.13 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.13" cache: "pip" @@ -177,14 +177,14 @@ jobs: outputs: version: ${{ steps.version.outputs.version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 ref: ${{ needs.determine-release.outputs.target_branch }} token: ${{ secrets.GH_PAT }} - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.11" @@ -241,7 +241,7 @@ jobs: VERSION="$BASE" fi - echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Publishing version: $VERSION" sed -i "s/__version__ = \".*\"/__version__ = \"$VERSION\"/" datafog/__about__.py @@ -322,7 +322,7 @@ jobs: if: needs.determine-release.outputs.release_type != 'stable' && inputs.dry_run != true runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Prune old alpha releases (keep 7) if: needs.determine-release.outputs.release_type == 'alpha' diff --git a/setup.py b/setup.py index f84c241a..39f01651 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,7 @@ # Optional heavy dependencies nlp_deps = [ + "click>=8.0,<9.0", "spacy>=3.7.0,<4.0", ] @@ -57,6 +58,7 @@ ] cli_deps = [ + "click>=8.0,<9.0", "typer>=0.12.0", "pydantic-settings>=2.0.0", ] diff --git a/tests/test_install_profiles.py b/tests/test_install_profiles.py index e17261be..7222186e 100644 --- a/tests/test_install_profiles.py +++ b/tests/test_install_profiles.py @@ -17,10 +17,13 @@ def test_install_profile_import_surface() -> None: assert datafog.scan("Email jane@example.com").entities assert datafog.redact("Email jane@example.com").redacted_text elif profile == "cli": + import click # noqa: F401 + from datafog.client import app assert app is not None elif profile == "nlp": + import click # noqa: F401 import spacy # noqa: F401 from datafog.models.spacy_nlp import SpacyAnnotator