Files
nuwiki/.gitea/workflows/ci.yaml
T
gffranco 0de2bd9d68
CI / cargo fmt --check (push) Successful in 18s
CI / cargo clippy (push) Successful in 26s
CI / cargo test (push) Successful in 35s
CI / editor keymaps (push) Successful in 1m24s
revert e530b3d623
revert Ci improvements (#3)

Reviewed-on: #3
2026-06-03 23:36:11 +00:00

109 lines
3.5 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
- name: run Neovim config parity harness
run: ./development/tests/test-config.sh
- name: run Vim config parity harness
run: ./development/tests/test-config-vim.sh
- name: run Neovim calendar integration harness
run: ./development/tests/test-calendar.sh
- name: run Vim calendar integration harness
run: ./development/tests/test-calendar-vim.sh
- name: run Vim vars-shim harness
run: ./development/tests/test-vars-vim.sh