Skip to content

refactor GH actions - #593

Merged
d-chambers merged 2 commits into
masterfrom
gh_action_refactor
Dec 24, 2025
Merged

refactor GH actions#593
d-chambers merged 2 commits into
masterfrom
gh_action_refactor

Conversation

@d-chambers

@d-chambers d-chambers commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

Description

This PR attempts to clean up the GH actions.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings and/or appropriate doc page.
  • included tests. See testing guidelines.
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

Summary by CodeRabbit

  • Chores

    • Simplified how CI determines and exposes Python version matrices.
    • Removed the separate shared-variables file for Python versions.
    • Updated workflows to use the renamed matrix outputs.
    • Added actionlint to pre-commit configuration.
  • Documentation

    • Added clarifying comments in multiple CI workflows indicating where Python-version values are sourced.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 24, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Refactors GitHub Actions CI/CD by moving Python version matrices from .github/shared-vars.yml into the load-shared-vars action with renamed outputs (python-test-matrix, python-min-deps-matrix), updates workflows to use the new outputs, adds comments pointing to the action, and adds an actionlint pre-commit hook.

Changes

Cohort / File(s) Summary
Action definition and shared variables refactoring
.github/actions/load-shared-vars/action.yml, .github/shared-vars.yml
Replaces test-matrix and min-deps-matrix outputs with python-test-matrix and python-min-deps-matrix; removes prior Python parsing/install script and hardcodes matrices; removes Python block from .github/shared-vars.yml.
Workflow output reference updates
.github/workflows/runtests.yml, .github/workflows/run_min_dep_tests.yml
Update outputs to reference steps.load-vars.outputs.python-test-matrix and steps.load-vars.outputs.python-min-deps-matrix; add comments noting source of shared values; add id: load-vars on load step.
Documentation comment additions & minor workflow tweaks
.github/workflows/build_deploy_master_docs.yaml, .github/workflows/build_deploy_stable_docs.yaml, .github/workflows/get_coverage.yml, .github/workflows/lint.yml, .github/workflows/profile.yml, .github/workflows/test_doc_build.yml, .github/workflows/upload_pypi.yml
Insert non-functional comments indicating Python version/matrix are defined in .github/actions/load-shared-vars/action.yml; remove environment URL assignment from build_deploy_master_docs.yaml.
Pre-commit configuration
.pre-commit-config.yaml
Add actionlint pre-commit hook (repository: https://github.com/rhysd/actionlint, rev v1.6.27).

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (2 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'refactor GH actions' is vague and generic—it uses non-descriptive terms that don't convey meaningful information about the specific changes. Provide a more specific title that highlights the main change, such as 'Move Python version matrix from shared-vars.yml to load-shared-vars action' or 'Refactor GitHub Actions to centralize Python version configuration'.
Description check ❓ Inconclusive The description is minimal and vague, lacking detail about what 'clean up' entails. While it follows the template structure, it fails to meaningfully explain the changes or their rationale. Expand the description to explain what cleanup was performed (e.g., consolidating Python version configuration, renaming outputs), why these changes improve the workflows, and link any related issues.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gh_action_refactor

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb2bb54 and b40a3f7.

📒 Files selected for processing (1)
  • .github/actions/load-shared-vars/action.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.14)
  • GitHub Check: test_code_min_deps (macos-latest, 3.14)
  • GitHub Check: test_code_min_deps (windows-latest, 3.14)
  • GitHub Check: test_code (macos-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.11)
  • GitHub Check: test_code (windows-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.12)
  • GitHub Check: test_code (macos-latest, 3.14)
  • GitHub Check: test_code (windows-latest, 3.14)
  • GitHub Check: test_code (macos-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.14)
  • GitHub Check: test_code (macos-latest, 3.12)
  • GitHub Check: test_code (ubuntu-latest, 3.13)
  • GitHub Check: test_code (ubuntu-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.12)
  • GitHub Check: Run benchmarks
🔇 Additional comments (3)
.github/actions/load-shared-vars/action.yml (3)

1-4: LGTM!

The action metadata is clear and the description accurately reflects its purpose of loading shared variables.


6-12: LGTM!

The output definitions are well-structured with clear descriptions and correct references to the step outputs.


22-23: No issues found. Python 3.14.0 was released on October 7, 2025, and GitHub Actions setup-python action supports it. The matrices are correct.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the CI continuous integration label Dec 24, 2025
@codecov

codecov Bot commented Dec 24, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.92%. Comparing base (79c09ac) to head (b40a3f7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #593   +/-   ##
=======================================
  Coverage   99.92%   99.92%           
=======================================
  Files         129      129           
  Lines       11272    11272           
=======================================
  Hits        11264    11264           
  Misses          8        8           
Flag Coverage Δ
unittests 99.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/actions/load-shared-vars/action.yml (1)

21-30: Eliminate duplication by defining arrays once.

The Python version arrays are duplicated between GITHUB_ENV (lines 23-24) and GITHUB_OUTPUT (lines 28-29). If these values need updating, both locations must be changed, creating a maintenance risk.

🔎 Proposed refactor to eliminate duplication
       run: |
+        PYTHON_TEST_MATRIX='["3.11","3.12","3.13","3.14"]'
+        PYTHON_MIN_DEPS_MATRIX='["3.13","3.14"]'
+
         {
           echo "PYTHON_DEFAULT=3.13"
-          echo 'PYTHON_TEST_MATRIX=["3.11","3.12","3.13","3.14"]'
-          echo 'PYTHON_MIN_DEPS_MATRIX=["3.13","3.14"]'
+          echo "PYTHON_TEST_MATRIX=${PYTHON_TEST_MATRIX}"
+          echo "PYTHON_MIN_DEPS_MATRIX=${PYTHON_MIN_DEPS_MATRIX}"
         } >> "$GITHUB_ENV"

         {
-          echo 'python-test-matrix=["3.11","3.12","3.13","3.14"]'
-          echo 'python-min-deps-matrix=["3.13","3.14"]'
+          echo "python-test-matrix=${PYTHON_TEST_MATRIX}"
+          echo "python-min-deps-matrix=${PYTHON_MIN_DEPS_MATRIX}"
         } >> "$GITHUB_OUTPUT"
.pre-commit-config.yaml (1)

35-38: Good addition for linting GitHub Actions workflows.

Adding actionlint aligns well with the PR's objective to refactor GitHub Actions and will help catch workflow errors early during pre-commit.

Note: v1.6.27 is valid, but the project is actively maintained with v1.7.9 available as of November 2025. Consider updating to the latest version for bug fixes and improvements.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 79c09ac and cb2bb54.

📒 Files selected for processing (12)
  • .github/actions/load-shared-vars/action.yml
  • .github/shared-vars.yml
  • .github/workflows/build_deploy_master_docs.yaml
  • .github/workflows/build_deploy_stable_docs.yaml
  • .github/workflows/get_coverage.yml
  • .github/workflows/lint.yml
  • .github/workflows/profile.yml
  • .github/workflows/run_min_dep_tests.yml
  • .github/workflows/runtests.yml
  • .github/workflows/test_doc_build.yml
  • .github/workflows/upload_pypi.yml
  • .pre-commit-config.yaml
💤 Files with no reviewable changes (1)
  • .github/shared-vars.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test_code (windows-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.12)
  • GitHub Check: test_code (windows-latest, 3.14)
  • GitHub Check: test_code (ubuntu-latest, 3.14)
  • GitHub Check: test_code (ubuntu-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.13)
  • GitHub Check: test_code (macos-latest, 3.14)
  • GitHub Check: test_code (windows-latest, 3.11)
  • GitHub Check: test_code (macos-latest, 3.13)
  • GitHub Check: test_code (ubuntu-latest, 3.12)
  • GitHub Check: test_code (macos-latest, 3.11)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
  • GitHub Check: test_code_min_deps (macos-latest, 3.14)
  • GitHub Check: test_code_min_deps (macos-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.14)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.14)
  • GitHub Check: Run benchmarks
🔇 Additional comments (11)
.github/workflows/profile.yml (1)

25-25: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable, making it easier for maintainers to locate and update version configurations.

.github/workflows/upload_pypi.yml (1)

26-26: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable.

.github/workflows/test_doc_build.yml (1)

23-23: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable.

.github/workflows/get_coverage.yml (1)

22-22: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable.

.github/workflows/build_deploy_stable_docs.yaml (1)

38-38: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable.

.github/workflows/lint.yml (1)

25-25: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable.

.github/workflows/build_deploy_master_docs.yaml (1)

43-43: Documentation comment improves maintainability.

The added comment clearly documents the source of the PYTHON_DEFAULT variable.

.github/workflows/run_min_dep_tests.yml (2)

26-26: Documentation comments improve maintainability.

The added comments clearly document the source of the Python version matrices, making the workflow easier to understand and maintain.

Also applies to: 30-30, 45-45


31-31: Output python-min-deps-matrix is correctly defined.

The .github/actions/load-shared-vars/action.yml file defines this output with description "Python version matrix for minimum dependency tests". The workflow reference is valid.

.github/workflows/runtests.yml (2)

28-37: LGTM! Clear documentation and correct output references.

The added comments clearly document where the Python version matrix is defined, and the output reference correctly uses the renamed python-test-matrix key with proper step id reference.


47-48: Good documentation addition.

The inline comment helpfully points developers to the source of the Python version matrix definition.

@codspeed-hq

codspeed-hq Bot commented Dec 24, 2025

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #593 will not alter performance

Comparing gh_action_refactor (b40a3f7) with master (79c09ac)

Summary

✅ 54 untouched

@d-chambers
d-chambers merged commit 071bcf8 into master Dec 24, 2025
25 checks passed
@d-chambers
d-chambers deleted the gh_action_refactor branch December 24, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant