1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: CI
on:
pull_request:
push:
branches:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test & Redis-spec compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Unit tests
run: cargo test --all
- name: Build release
run: cargo build --release
# The compatibility suite diffs meebis against the real Redis server,
# command-for-command, so a regression against the Redis spec fails CI.
# Pin the reference to Redis 7.2 rather than apt's 7.0.x: OBJECT ENCODING
# for lists is version-sensitive (small lists report `listpack` on 7.2+
# but `quicklist` on 7.0), and meebis targets the modern 7.2 encodings.
- name: Install reference Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: '7.2'
auto-start: 'false'
- name: Set up Python (for the RESP3 parity check)
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install redis-py
run: pip install redis
- name: Redis compatibility suite
run: bash tests/compat/run.sh ./target/release/meebis
# The Claude Code plugin's hooks are shell, so nothing else in the build
# would notice them breaking. This drives them the way Claude Code does —
# the script from hooks.json, the event JSON on stdin — against the
# binary just built.
- name: Claude Code plugin hooks
run: bash claude-code/test-hooks.sh ./target/release/meebis
# Runs the direnv recipe extracted from README.md itself, so the
# documented snippet cannot rot into something that does not work.
- name: direnv recipe
run: bash tests/envrc-recipe.sh ./target/release/meebis
# The asdf plugin in bin/ installs published release assets, so it can
# break without anything in this repo changing — a rename in the release
# layout would only show up here.
- name: asdf plugin
run: bash tests/asdf-plugin.sh
# The devcontainer feature installs published release assets into other
# people's images, so nothing in the cargo build would notice it breaking.
devcontainer:
name: Devcontainer feature
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Feature tests
run: >
npx --yes @devcontainers/cli@latest features test
--project-folder devcontainer
--features meebis
--base-image mcr.microsoft.com/devcontainers/base:debian
# The harness above cannot cover unsupported bases: a feature that fails
# to install fails the image build, so there is no container left to
# assert in. This checks those refusals name their reason.
- name: Base image matrix
run: bash devcontainer/test-bases.sh