Skip to content

feat: Move to the renamed claude-agent-acp (#131) #479

feat: Move to the renamed claude-agent-acp (#131)

feat: Move to the renamed claude-agent-acp (#131) #479

Workflow file for this run

name: PR Checks
on:
pull_request:
branches: [main]
paths:
- 'lua/**'
- 'tests/**'
- 'Makefile'
- '.luarc.json'
- 'stylua.toml'
- 'selene.toml'
- 'vim.toml'
- '.github/workflows/pr-check.yml'
push:
branches: [main]
paths:
- 'lua/**'
- 'tests/**'
- 'Makefile'
- '.luarc.json'
- 'stylua.toml'
- 'selene.toml'
- 'vim.toml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
LUALS_VERSION: 3.16.2
STYLUA_VERSION: 2.3.1
SELENE_VERSION: 0.30.0
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup directories
run: mkdir -p .local/bin
- name: Cache StyLua
id: cache-stylua
uses: actions/cache@v4
with:
path: .local/bin/stylua
key: stylua-${{ runner.os }}-${{ env.STYLUA_VERSION }}
- name: Install StyLua
if: steps.cache-stylua.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/JohnnyMorganz/StyLua/releases/download/v${{ env.STYLUA_VERSION }}/stylua-linux-x86_64.zip" -o stylua.zip
unzip -q stylua.zip -d .local/bin/
chmod +x .local/bin/stylua
- name: Check formatting
run: |
export PATH="$PWD/.local/bin:$PATH"
make format-check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup directories
run: mkdir -p .local/bin
- name: Cache Selene
id: cache-selene
uses: actions/cache@v4
with:
path: .local/bin/selene
key: selene-${{ runner.os }}-${{ env.SELENE_VERSION }}
- name: Install Selene
if: steps.cache-selene.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/Kampfkarren/selene/releases/download/${{ env.SELENE_VERSION }}/selene-${{ env.SELENE_VERSION }}-linux.zip" -o selene.zip
unzip -q selene.zip -d .local/bin/
chmod +x .local/bin/selene
rm selene.zip
- name: Run selene
run: |
export PATH="$PWD/.local/bin:$PATH"
make selene
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
neovim-version: ['v0.11.5', 'nightly']
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
# Install newer versions of rg and fd for unit tests
curl -sL "$(curl -s https://api.github.com/repos/BurntSushi/ripgrep/releases/latest \
| grep "browser_download_url.*x86_64-unknown-linux-musl.tar.gz" \
| cut -d '"' -f 4 | head -n1)" \
| tar -xz -C /usr/local/bin --strip-components=1 --wildcards '*/rg'
chmod +x /usr/local/bin/rg
echo "[DEBUG] RG version: $(rg --version) from '$(which rg)' \n"
curl -sL "$(curl -s https://api.github.com/repos/sharkdp/fd/releases/latest | grep "browser_download_url.*fd-.*-x86_64-unknown-linux-gnu\.tar\.gz" | cut -d '"' -f 4)" \
| tar -xz -C /usr/local/bin --strip-components=1 --wildcards '*/fd'
chmod +x /usr/local/bin/fd
echo "[DEBUG] FD version: $(fd --version) from '$(which fd)' \n"
- name: Setup directories
run: mkdir -p .local/nvim .local/bin
- name: Cache Neovim
id: cache-neovim
uses: actions/cache@v4
with:
path: .local/nvim
key: neovim-${{ runner.os }}-${{ matrix.neovim-version }}
- name: Install Neovim
if: steps.cache-neovim.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.neovim-version }}/nvim-linux-x86_64.tar.gz" |
tar xzf - --strip-components=1 -C .local/nvim
- name: Cache deps (mini.nvim)
uses: actions/cache@v4
with:
path: deps
key: deps-${{ runner.os }}-${{ hashFiles('tests/init.lua') }}
- name: Run tests
run: |
ln -sf "$PWD/.local/nvim/bin/nvim" .local/bin/nvim
export PATH="$PWD/.local/bin:$PATH"
make test
typecheck:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
neovim-version: ['v0.11.5', 'nightly']
steps:
- uses: actions/checkout@v4
- name: Setup directories
run: mkdir -p .local/nvim .local/bin .local/luals
- name: Cache Neovim
id: cache-neovim
uses: actions/cache@v4
with:
path: .local/nvim
key: neovim-${{ runner.os }}-${{ matrix.neovim-version }}
- name: Install Neovim
if: steps.cache-neovim.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.neovim-version }}/nvim-linux-x86_64.tar.gz" |
tar xzf - --strip-components=1 -C .local/nvim
- name: Cache LuaLS
id: cache-luals
uses: actions/cache@v4
with:
path: .local/luals
key: luals-${{ runner.os }}-${{ env.LUALS_VERSION }}
- name: Install LuaLS
if: steps.cache-luals.outputs.cache-hit != 'true'
run: |
curl -sL "https://github.com/LuaLS/lua-language-server/releases/download/${{ env.LUALS_VERSION }}/lua-language-server-${{ env.LUALS_VERSION }}-linux-x64.tar.gz" |
tar xzf - -C .local/luals
- name: Cache deps (mini.nvim)
id: cache-deps
uses: actions/cache@v4
with:
path: deps
key: deps-${{ runner.os }}-${{ hashFiles('tests/init.lua') }}
- name: Install deps (mini.nvim)
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
mkdir -p deps
git clone --depth=1 https://github.com/echasnovski/mini.nvim deps/mini.nvim
- name: Run type check
run: |
ln -sf "$PWD/.local/luals/bin/lua-language-server" .local/bin/lua-language-server
ln -sf "$PWD/.local/nvim/bin/nvim" .local/bin/nvim
export PATH="$PWD/.local/bin:$PATH"
make luals