mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2026-05-04 02:03:07 +02:00
Install Neovim in workflows that run tests: - testsMaintenance.yml: deals with @TestWithoutNeovim annotations - codebaseMaintenance.yml: can run gradle tests - youtrackAutoAnalysis.yml: uses TDD for bug fixes and features Also add guidance in testsMaintenance to verify actual Neovim behavior when working with skip reasons, and allow nvim/echo bash commands. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
88 lines
3.4 KiB
YAML
88 lines
3.4 KiB
YAML
name: Tests Maintenance with Claude
|
|
|
|
on:
|
|
schedule:
|
|
# Run daily at 7 AM UTC
|
|
- cron: '0 7 * * *'
|
|
workflow_dispatch: # Allow manual trigger
|
|
|
|
jobs:
|
|
maintain-tests:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'JetBrains/ideavim'
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
id-token: write
|
|
issues: read
|
|
actions: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Need history for context
|
|
|
|
- name: Install Neovim
|
|
run: |
|
|
wget https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
|
tar xzf nvim-linux-x86_64.tar.gz
|
|
echo "$PWD/nvim-linux-x86_64/bin" >> $GITHUB_PATH
|
|
|
|
- name: Run Claude Code for Tests Maintenance
|
|
uses: anthropics/claude-code-action@v1
|
|
with:
|
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
|
|
prompt: |
|
|
## Task: Perform Tests Maintenance
|
|
|
|
Your goal is to inspect a random part of the IdeaVim test suite and perform maintenance checks.
|
|
|
|
Use the tests-maintenance skill to load the detailed instructions.
|
|
|
|
Focus on ONE of these areas per run (pick randomly):
|
|
1. Check disabled tests (@Disabled) - can any be re-enabled?
|
|
2. Review @TestWithoutNeovim annotations - are reasons clear and documented?
|
|
3. Check test content quality - replace meaningless strings with realistic content
|
|
|
|
## Neovim Testing Constraints
|
|
|
|
Neovim can only test methods that use functions from VimTestCase. If a test uses
|
|
other API functions (public plugin API like VimPlugin.* or internal API like
|
|
injector.*), it cannot be tested with Neovim because we cannot properly synchronize
|
|
the Neovim state. In these cases, use @TestWithoutNeovim with IDEAVIM_API_USED as
|
|
the skip reason and provide a description of which API is being used.
|
|
|
|
## Verifying Neovim Behavior
|
|
|
|
When working with @TestWithoutNeovim annotations or investigating skip reasons,
|
|
verify the actual behavior in Neovim by running `nvim` directly. For example:
|
|
- `echo "test content" | nvim -u NONE -` to test with specific content
|
|
- Use `:normal` commands to execute Vim commands programmatically
|
|
This helps ensure skip reasons are accurate and not based on assumptions.
|
|
|
|
## Important Guidelines
|
|
|
|
- Only work on tests, never fix source code bugs
|
|
- Select a small subset of tests (1-3 files) per run
|
|
- Run tests to verify changes don't break anything
|
|
|
|
## Creating Pull Requests
|
|
|
|
**Only create a pull request if you made changes.**
|
|
|
|
If you made changes, create a PR with:
|
|
- **Title**: "Tests maintenance: <brief description>"
|
|
- Example: "Tests maintenance: Re-enable ScrollTest, add Neovim skip descriptions"
|
|
- **Body** including:
|
|
- What area you inspected
|
|
- Issues you found
|
|
- Changes you made
|
|
|
|
If no changes are needed, do not create a pull request.
|
|
|
|
# Allow Claude to use necessary tools for test inspection and maintenance
|
|
claude_args: '--allowed-tools "Skill,Read,Edit,Write,Glob,Grep,Bash(git:*),Bash(gh:*),Bash(./gradlew:*),Bash(find:*),Bash(shuf:*),Bash(nvim:*),Bash(echo:*)"'
|