Skip to content

Commit d48b339

Browse files
author
danil.radkovskyi
committed
Use prebuilt redis in CI to stabilize install
@devvit/test depends on redis-memory-server, whose postinstall downloads and compiles Redis and its modules from source. That source build is slow and fails intermittently on ubuntu CI (RedisJSON/RedisTimeSeries), which broke the Install Dependencies step. Install redis-server from apt and set REDISMS_SYSTEM_BINARY to it. This skips the install-time source compile entirely and makes the unit tests run against the prebuilt binary. Built with Snoocode
1 parent 77e2785 commit d48b339

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@ on:
1010
jobs:
1111
test:
1212
runs-on: ubuntu-latest
13+
env:
14+
# @devvit/test pulls in redis-memory-server, which by default downloads
15+
# and compiles Redis (plus modules) from source on install and on first
16+
# test run. That source build is slow and unreliable in CI. Point it at
17+
# the prebuilt redis-server we install below: this both skips the
18+
# install-time compile and makes the tests use the system binary.
19+
REDISMS_SYSTEM_BINARY: /usr/bin/redis-server
1320
steps:
1421
- name: Checkout
1522
uses: actions/checkout@v7.0.0
1623
- name: Install Node.js
1724
uses: actions/setup-node@v6.4.0
1825
with:
1926
node-version: 22.20.0
27+
- name: Install Redis
28+
run: sudo apt-get update && sudo apt-get install -y redis-server
2029
- name: Install Dependencies
2130
run: npm install --no-fund
2231
- parallel:

0 commit comments

Comments
 (0)