Skip to content

ci: add actionlint to CI to early prevent bug in github workflows#1119

Merged
Czaki merged 3 commits into
developfrom
actionlint
Jul 4, 2024
Merged

ci: add actionlint to CI to early prevent bug in github workflows#1119
Czaki merged 3 commits into
developfrom
actionlint

Conversation

@Czaki

@Czaki Czaki commented Jul 3, 2024

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Workflow scripts updated for consistency and better shell command execution.
    • Linting added for workflow files to ensure quality and adherence to standards.
    • Python version updated to 3.11 for testing and pre-release workflows.
    • Environment variables in workflows explicitly set for clarity.

@Czaki Czaki added this to the 0.15.3 milestone Jul 3, 2024
@sourcery-ai

sourcery-ai Bot commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

🧙 Sourcery has finished reviewing your pull request!


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@coderabbitai

coderabbitai Bot commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

Walkthrough

The changes across the GitHub workflows aim to enhance the configuration and execution of automated tests and dependency upgrades. Key updates include specifying the shell for PowerShell steps, aligning Python versions to 3.11, ensuring proper job naming, and adding an actionlint job for linting workflows. These enhancements improve the clarity, reliability, and maintainability of the CI/CD processes for the project.

Changes

File/Directory Change Summary
.github/workflows/base_test_workflow.yml Added shell: powershell to specify the shell for the "Install Windows OpenGL" step.
.github/workflows/test_napari_repo.yml Added shell: powershell command to specify the shell for subsequent commands.
.github/workflows/test_napari_widgets.yml Removed ${{ matrix.napari }} from the job name, retaining ${{ matrix.qt_backend }}.
.github/workflows/test_prereleases.yml Modified job names, added shell command, updated Python version to 3.11, and explicitly set PLATFORM to "linux" and PYTHON to "3.11".
.github/workflows/tests.yml Added actionlint job and updated coverage report command to append output to $GITHUB_STEP_SUMMARY.
.github/workflows/upgrade-dependencies.yml Corrected output redirection to $GITHUB_OUTPUT in a shell script.
.github/workflows/make_release.yml Modified script commands for installing PartSeg and handling release notes, adding quotes around specifier and variable redirections.

Poem

Amid the code, the scripts did grow,
With PowerShell’s touch, they now bestow,
Python’s clarity shines so bright,
And actionlint keeps errors slight,
A smoother flow for all to cheer,
The code runs swift, the path is clear. 🚀🐇


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sourcery-ai sourcery-ai 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.

We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 65e788f and 034723d.

Files selected for processing (6)
  • .github/workflows/base_test_workflow.yml (1 hunks)
  • .github/workflows/test_napari_repo.yml (1 hunks)
  • .github/workflows/test_napari_widgets.yml (1 hunks)
  • .github/workflows/test_prereleases.yml (4 hunks)
  • .github/workflows/tests.yml (2 hunks)
  • .github/workflows/upgrade-dependencies.yml (1 hunks)
Files skipped from review due to trivial changes (2)
  • .github/workflows/test_napari_repo.yml
  • .github/workflows/test_napari_widgets.yml
Additional comments not posted (6)
.github/workflows/upgrade-dependencies.yml (1)

50-53: Verify the correctness of appending output to $GITHUB_OUTPUT.

Ensure that the output is correctly formatted and appended to the GitHub Actions step summary.

.github/workflows/base_test_workflow.yml (1)

74-74: Verify the correctness of the shell: powershell directive.

Ensure that the PowerShell script is correctly executed in the specified shell.

.github/workflows/test_prereleases.yml (2)

62-62: Verify the correctness of the shell: powershell directive.

Ensure that the PowerShell script is correctly executed in the specified shell.

Verification successful

The shell: powershell directive is correctly specified and used. The commands following the directive are written in PowerShell syntax and appropriately utilize PowerShell features.

  • .github/workflows/test_prereleases.yml:
    • Line 62: shell: powershell
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correctness of the shell directive.

# Test: Check the shell directive. Expect: Correctly specified shell.
rg --type yaml 'shell: powershell'

Length of output: 36



Script:

#!/bin/bash
# Description: Verify the correctness of the shell directive in the specified file.

# Test: Check the shell directive in the .github/workflows/test_prereleases.yml file.
rg 'shell: powershell' .github/workflows/test_prereleases.yml

Length of output: 89



Script:

#!/bin/bash
# Description: Extract and review the relevant section of the .github/workflows/test_prereleases.yml file to verify the correctness of the PowerShell commands.

# Extract lines around the shell directive to review the context.
rg -A 5 -B 5 'shell: powershell' .github/workflows/test_prereleases.yml

Length of output: 509


38-38: Verify the correctness of the job name.

Ensure that the job name is correctly specified and does not cause any issues.

Verification successful

Job name is correctly specified.

The job name name: ${{ matrix.platform }} py${{ matrix.python }} --pre is correctly specified in the test_prereleases.yml file.

  • .github/workflows/test_prereleases.yml: Line 38
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correctness of the job name.

# Test: Check the job name. Expect: Correctly specified job name.
rg --type yaml 'name: \${{ matrix.platform }} py\${{ matrix.python }} --pre'

Length of output: 229



Script:

#!/bin/bash
# Description: Verify the correctness of the job name.

# Test: Check the job name. Expect: Correctly specified job name.
rg --type yaml 'name: \${{\s*matrix\.platform\s*}}\s*py\${{\s*matrix\.python\s*}}\s*--pre'

Length of output: 257



Script:

#!/bin/bash
# Description: Verify the correctness of the job name.

# Test: Check the job name. Expect: Correctly specified job name.
rg --type yaml 'name: \${{ matrix.platform }} py\${{ matrix.python }} --pre'

Length of output: 229



Script:

#!/bin/bash
# Description: Verify the correctness of the job name.

# Test: Check the job name. Expect: Correctly specified job name.
rg --type yaml 'name: \${{\ matrix\.platform\ }}\ py\${{\ matrix\.python\ }}\ --pre'

Length of output: 245



Script:

#!/bin/bash
# Description: Verify the correctness of the job name.

# Test: Check the job name. Expect: Correctly specified job name.
grep -r 'name: \${{ matrix.platform }} py\${{ matrix.python }} --pre' --include \*.yml

Length of output: 190

.github/workflows/tests.yml (2)

162-162: Verify the correctness of appending output to $GITHUB_STEP_SUMMARY.

Ensure that the output is correctly formatted and appended to the GitHub Actions step summary.


20-30: Verify the correctness of the new actionlint job.

Ensure that the actionlint job is correctly specified and functions as intended.

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2024

Copy link
Copy Markdown

@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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 034723d and 66f0a89.

Files selected for processing (1)
  • .github/workflows/make_release.yml (3 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/make_release.yml

@Czaki Czaki merged commit 7dacfcb into develop Jul 4, 2024
@Czaki Czaki deleted the actionlint branch July 4, 2024 11:37
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