088cf81bcb
CI / cargo fmt --check (push) Successful in 27s
CI / cargo clippy (push) Successful in 34s
CI / cargo test (push) Successful in 35s
CI / cargo fmt --check (pull_request) Successful in 32s
CI / cargo clippy (pull_request) Successful in 28s
CI / cargo test (pull_request) Successful in 33s
CI / editor keymaps (push) Successful in 1m27s
CI / editor keymaps (pull_request) Successful in 1m27s
Move the four keymap-harness files (test-keymaps.sh/.lua and the Vim counterparts) into a development/tests/ subfolder so they sit apart from the interactive dev launchers. REPO_ROOT now climbs two levels, and the internal source paths, CI invocations, and ONBOARDING tree are updated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
99 lines
3.0 KiB
YAML
99 lines
3.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: short
|
|
RUSTFLAGS: -D warnings
|
|
|
|
jobs:
|
|
fmt:
|
|
name: cargo fmt --check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.83
|
|
with:
|
|
components: rustfmt
|
|
- run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
name: cargo clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.83
|
|
with:
|
|
components: clippy
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-clippy-
|
|
- run: cargo clippy --workspace --all-targets -- -D warnings
|
|
|
|
test:
|
|
name: cargo test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.83
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-test-
|
|
- run: cargo test --workspace --all-targets
|
|
|
|
keymaps:
|
|
name: editor keymaps
|
|
runs-on: ubuntu-latest
|
|
# Serialise behind the cargo jobs so we never compete with them
|
|
# for runners, and inherit their warm cargo cache instead of
|
|
# forcing a release build of our own.
|
|
needs: test
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.83
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-test-
|
|
- name: install Neovim 0.11 + Vim
|
|
run: |
|
|
set -euo pipefail
|
|
# Apt's neovim is too old (Ubuntu LTS ships 0.6/0.7), missing
|
|
# `vim.lsp.get_clients` and rejecting `@group.modifier`
|
|
# highlight names. Pull the official static tarball instead.
|
|
NVIM_VER=v0.11.3
|
|
curl -fsSL -o /tmp/nvim.tar.gz \
|
|
"https://github.com/neovim/neovim/releases/download/${NVIM_VER}/nvim-linux-x86_64.tar.gz"
|
|
sudo tar -xzf /tmp/nvim.tar.gz -C /opt
|
|
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
|
|
nvim --version | head -1
|
|
# Vim from apt is fine — only the pure-VimL keymaps run there.
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y --no-install-recommends vim
|
|
vim --version | head -1
|
|
- name: run Neovim keymap harness
|
|
run: ./development/tests/test-keymaps.sh
|
|
- name: run Vim keymap harness
|
|
run: ./development/tests/test-keymaps-vim.sh
|