Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add PartialClaudeCodeConfig type for better configuration handling #344

feat: add PartialClaudeCodeConfig type for better configuration handling

feat: add PartialClaudeCodeConfig type for better configuration handling #344

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
# Cancel in-progress runs for pull requests when developers push
# additional changes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
neovim-version: ["stable", "nightly"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Nix
uses: nixbuild/nix-quick-install-action@5bb6a3b3abe66fd09bbf250dce8ada94f856a703 # v30
- uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a # v6.1.3
with:
primary-key: nix-claudecode-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-claudecode-${{ runner.os }}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-claudecode-${{ runner.os }}-
purge-created: 0
purge-primary-key: never
- name: Setup Neovim
uses: rhysd/action-setup-vim@8e931b9954b19d4203d5caa5ff5521f3bc21dcc7 # v1.4.2
with:
neovim: true
version: ${{ matrix.neovim-version }}
- name: Run Luacheck
run: nix develop .#ci -c make check
- name: Run tests
run: nix develop .#ci -c make test
- name: Check formatting
run: nix flake check
- name: Generate coverage report
run: |
if [ -f "luacov.stats.out" ]; then
nix develop .#ci -c luacov
echo "Creating lcov.info from luacov.report.out"
{
echo "TN:"
grep -E "^Summary$" -A1000 luacov.report.out | grep -E "^[^ ].*:" | while read -r line; do
file=$(echo "$line" | cut -d':' -f1)
echo "SF:$file"
percent=$(echo "$line" | grep -oE "[0-9\.]+%" | tr -d '%')
if [ -n "$percent" ]; then
echo "DA:1,1"
echo "LF:1"
echo "LH:$percent"
fi
echo "end_of_record"
done
} > lcov.info
{
echo "## πŸ“Š Test Coverage Report"
echo ""
if [ -f "luacov.report.out" ]; then
overall_coverage=$(grep -E "Total.*%" luacov.report.out | grep -oE "[0-9]+\.[0-9]+%" | head -1)
if [ -n "$overall_coverage" ]; then
echo "**Overall Coverage: $overall_coverage**"
echo ""
fi
echo "| File | Coverage |"
echo "|------|----------|"
grep -E "^[^ ].*:" luacov.report.out | while read -r line; do
file=$(echo "$line" | cut -d':' -f1)
percent=$(echo "$line" | grep -oE "[0-9]+\.[0-9]+%" | head -1)
if [ -n "$percent" ]; then
# Add emoji based on coverage level
percent_num="${percent%.*}"
if [ "$percent_num" -ge 90 ]; then
emoji="🟒"
elif [ "$percent_num" -ge 70 ]; then
emoji="🟑"
else
emoji="πŸ”΄"
fi
echo "| \`$file\` | $emoji $percent |"
fi
done
else
echo "❌ No coverage report generated"
fi
} >> "$GITHUB_STEP_SUMMARY"
else
{
echo "## πŸ“Š Test Coverage Report"
echo ""
echo "❌ No coverage data found - tests may not have run with coverage enabled"
} >> "$GITHUB_STEP_SUMMARY"
fi
integration-tests:
runs-on: ubuntu-latest
needs: unit-tests
strategy:
matrix:
neovim-version: ["stable"]
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Nix
uses: nixbuild/nix-quick-install-action@5bb6a3b3abe66fd09bbf250dce8ada94f856a703 # v30
- uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a # v6.1.3
with:
primary-key: nix-claudecode-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-claudecode-${{ runner.os }}-
gc-max-store-size-linux: 2G
purge: true
purge-prefixes: nix-claudecode-${{ runner.os }}-
purge-created: 0
purge-primary-key: never
- name: Setup Neovim
uses: rhysd/action-setup-vim@8e931b9954b19d4203d5caa5ff5521f3bc21dcc7 # v1.4.2
with:
neovim: true
version: ${{ matrix.neovim-version }}
- name: Install test dependencies
run: |
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
ln -s "$(pwd)" ~/.local/share/nvim/site/pack/vendor/start/claudecode.nvim
- name: Run integration tests
run: nix develop .#ci -c ./scripts/run_integration_tests_individually.sh

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /