Skip to content

feat(ci): add GitHub Actions workflow with code coverage#3

Merged
AnnatarHe merged 3 commits intomainfrom
feat/add-github-actions-ci
Dec 28, 2025
Merged

feat(ci): add GitHub Actions workflow with code coverage#3
AnnatarHe merged 3 commits intomainfrom
feat/add-github-actions-ci

Conversation

@AnnatarHe
Copy link
Copy Markdown
Contributor

Summary

  • Add CI workflow testing on Neovim v0.11.0 and nightly
  • Configure luacov for code coverage tracking
  • Add coverage upload to Codecov
  • Create test-coverage.sh script for coverage collection

Test plan

  • Verify CI workflow runs successfully on push
  • Check that tests pass on both Neovim versions
  • Confirm coverage report uploads to Codecov

🤖 Generated with Claude Code

- Add CI workflow testing on Neovim v0.11.0 and nightly
- Configure luacov for code coverage tracking
- Add coverage upload to Codecov
- Create test-coverage.sh script for coverage collection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @AnnatarHe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a robust Continuous Integration (CI) pipeline using GitHub Actions. Its primary goal is to enhance code quality by automating tests across different Neovim versions and integrating code coverage tracking with luacov. The collected coverage data is then uploaded to Codecov, providing a clear overview of test effectiveness and helping maintain high standards for the codebase.

Highlights

  • CI Workflow: Introduced a new GitHub Actions workflow to automate testing on Neovim versions v0.11.0 and nightly.
  • Code Coverage: Integrated luacov for tracking code coverage during test runs.
  • Coverage Reporting: Configured the workflow to upload code coverage reports to Codecov for detailed analysis.
  • Coverage Script: Added a new "test-coverage.sh" script to manage the execution of tests with luacov and generation of lcov reports.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces code coverage reporting by adding a .luacov configuration and a test-coverage.sh script to run tests and generate a coverage report. The changes are a great step towards improving code quality and testability. I have a couple of suggestions for the test-coverage.sh script to enhance its robustness and adherence to shell scripting best practices.

Comment thread scripts/test-coverage.sh
# Run tests with code coverage using luacov
# Requires: luacov, luacov-reporter-lcov installed via luarocks

set -e
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For better script robustness, it's recommended to use set -euo pipefail instead of just set -e.

This will make the script exit on unset variables (-u) and on failures in pipelines (-o pipefail), which are common sources of bugs in shell scripts.

Suggested change
set -e
set -euo pipefail

Comment thread scripts/test-coverage.sh Outdated
luacov -r lcov -o lcov.info
echo "Coverage report generated: lcov.info"
else
echo "Warning: No coverage stats generated"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

It's a good practice to redirect warning and error messages to standard error (stderr). This allows for better separation of normal output from error messages, which can be useful for logging and redirection in CI environments.

Suggested change
echo "Warning: No coverage stats generated"
echo "Warning: No coverage stats generated" >&2

AnnatarHe and others added 2 commits December 28, 2025 21:00
The tests require 'tests.helpers' but the package path only included
the tests/ directory, causing resolution to fail in CI environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create coverage_init.lua to load luacov before test code
- Save coverage stats on VimLeavePre autocmd
- Set LUA_PATH/LUA_CPATH env vars for luarocks modules
- Don't fail CI if coverage stats unavailable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AnnatarHe AnnatarHe merged commit 4fa8be1 into main Dec 28, 2025
2 checks passed
@AnnatarHe AnnatarHe deleted the feat/add-github-actions-ci branch December 28, 2025 13:13
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