bullmq-tests #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These tests are disabled until Dragonfly works well with BullMQ. | |
name: bullmq-tests | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
bullmq: | |
runs-on: ubuntu-latest | |
name: bullmq-test | |
timeout-minutes: 60 | |
services: | |
dragonflydb: | |
#image: ghcr.io/dragonflydb/dragonfly-weekly:latest | |
image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.24.0 | |
env: | |
DFLY_cluster_mode: emulated | |
DFLY_lock_on_hashtags: true | |
DFLY_proactor_threads: 2 | |
HEALTHCHECK_PORT: 6379 | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Print DragonflyDB logs | |
run: | | |
echo "DragonflyDB service logs:" | |
docker logs $(docker ps --filter "ancestor=docker.dragonflydb.io/dragonflydb/dragonfly:v1.24.0" --format "{{.ID}}") | |
- name: install Rediscli | |
run: | | |
sudo apt-get update && sudo apt-get install -y redis-tools | |
- name: install yarn | |
run: | | |
#npm -g install yarn --no-lockfile | |
sudo apt update | |
sudo apt install yarn jq | |
- name: Install NodeJs | |
run: | | |
wget -q https://unofficial-builds.nodejs.org/download/release/v22.12.0/node-v22.12.0-linux-x64-glibc-217.tar.xz | |
tar -xf node-v22.12.0-linux-x64-glibc-217.tar.xz | |
sudo cp -r node-v22.12.0-linux-x64-glibc-217/* /usr/local/ | |
node --version | |
npm --version | |
yarn --version | |
- name: Build and Test BullMQ | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/../bullmq | |
cd $GITHUB_WORKSPACE/../bullmq | |
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/taskforcesh/bullmq/releases/latest | jq -r '.tarball_url') | |
echo "Downloading latest BullMQ release from ${DOWNLOAD_URL}" | |
wget -q -O bullmq.tar.gz ${DOWNLOAD_URL} | |
tar -zxf bullmq.tar.gz | |
mv taskforcesh-bullmq-* bullmq | |
#git clone https://github.com/taskforcesh/bullmq | |
cd bullmq | |
pwd | |
patch -p1 -f < $GITHUB_WORKSPACE/bullmq.patch | |
yarn install | |
yarn build | |
sed -i 's/timeout: 4000/timeout: 10000/' .mocharc.js | |
for i in {1..100}; do | |
BULLMQ_TEST_PREFIX={b} yarn test -g "should keep workers busy"; | |
redis-cli info Commandstats | |
done | |
- name: Print DragonflyDB logs | |
if: always() | |
run: | | |
echo "DragonflyDB service logs:" | |
docker logs $(docker ps --filter "ancestor=docker.dragonflydb.io/dragonflydb/dragonfly:v1.24.0" --format "{{.ID}}") | |
- name: Print INFO ALL | |
if: always() | |
run: | | |
redis-cli info all | |
- name: Upload logs on failure | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit_logs | |
path: /tmp/dragonfly.* |