Skip to content

CI: fix deprecation warnings - #9960

Merged
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:fix-ci-warnings
Jul 28, 2026
Merged

CI: fix deprecation warnings#9960
ThomasWaldmann merged 1 commit into
borgbackup:masterfrom
ThomasWaldmann:fix-ci-warnings

Conversation

@ThomasWaldmann

@ThomasWaldmann ThomasWaldmann commented Jul 27, 2026

Copy link
Copy Markdown
Member

Fixes the two deprecation warnings currently shown on CI runs.

lint: Node.js 20 deprecation

Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: astral-sh/ruff-action@v3.

Bumped astral-sh/ruff-action v3 -> v4.1.0. Checked the manifests: v3.6.1 declares using: node20, v4.1.0 declares using: node24.

The exact version has to be pinned: with v4 astral-sh switched to immutable releases and no longer publishes a floating v4 major tag (only v4.0.0 and v4.1.0 exist), so @v4 does not resolve.

Ruff version resolution itself is unchanged (pyproject-discovered, else latest), and we don't pin ruff, so both v3 and v4 use the latest ruff.

vm_tests: deprecated run input

Input 'run' has been deprecated with message: The "run" parameter is deprecated. Use the custom shell (shell: cpa.sh {0}) on subsequent steps to run commands in the virtual machine instead.

Split the single cross-platform-actions/action step into a "Start VM" step plus a test step using the recommended custom shell:

- name: Start VM for ${{ matrix.display_name }}
  uses: cross-platform-actions/action@v1.3.0
  with:
    operating_system: ${{ matrix.os }}
    version: ${{ matrix.version }}
    shell: bash

- name: Test on ${{ matrix.display_name }}
  shell: cpa.sh {0}
  run: |
    ...

The test script itself is unchanged apart from a 2-space dedent — git diff -w shows only the two hunks above.

Two behaviour details that matter here:

  • File sync: with shell: cpa.sh {0} the helper syncs runner->vm before the script and vm->runner after, so artifacts/*, test-results.xml and coverage.xml still reach the later upload steps.
  • shutdown_vm: its default flips from true to false once run is gone, which is what we want here — the VM has to survive into the test step.

- lint: bump astral-sh/ruff-action v3 -> v4.1.0.
  v3 runs on node20, which is deprecated and force-run on node24 now.
  v4 natively targets node24. No change in ruff version resolution.
  v4 uses immutable releases and publishes no floating major tag,
  so the exact version has to be pinned.

- vm_tests: stop using the deprecated "run" input of
  cross-platform-actions/action. Split the step into a "Start VM" step
  and a test step that uses the custom shell (shell: cpa.sh {0}), as
  recommended by the action. File sync (runner->vm before, vm->runner
  after) happens automatically, so the artifact / test-results.xml /
  coverage.xml uploads keep working.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.70%. Comparing base (4a25abc) to head (6cf7dfd).
⚠️ Report is 3 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9960      +/-   ##
==========================================
+ Coverage   85.68%   85.70%   +0.01%     
==========================================
  Files          95       95              
  Lines       16799    16815      +16     
  Branches     2574     2577       +3     
==========================================
+ Hits        14394    14411      +17     
+ Misses       1669     1668       -1     
  Partials      736      736              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann
ThomasWaldmann merged commit 470182b into borgbackup:master Jul 28, 2026
15 checks passed
@ThomasWaldmann
ThomasWaldmann deleted the fix-ci-warnings branch July 28, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant