Skip to content

Commit

Permalink
Upload redis log as artifact
Browse files Browse the repository at this point in the history
We know that there's no *.pid and no *.sock prior exporting REDIS_URL
  • Loading branch information
fidel committed Jan 3, 2025
1 parent 09ce3a6 commit 1649d0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ruby_event_store-outbox_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ jobs:
}
"
working-directory: "${{ env.WORKING_DIRECTORY }}"
- uses: actions/upload-artifact@v3
if: always()
with:
name: redis-logs
path: "{{ env.REDIS_LOG_FILE }}"
9 changes: 4 additions & 5 deletions support/nix/redis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mkShell {
TMP=$(mktemp -d)
SOCKET=$TMP/redis.sock
PIDFILE=$TMP/redis.pid
LOGFILE=$TMP/redis.log
redis-server \
--protected-mode no \
Expand All @@ -17,14 +18,12 @@ mkShell {
--save "" \
--daemonize yes \
--pidfile $PIDFILE \
--loglevel verbose
--loglevel verbose \
--logfile $LOGFILE
export REDIS_LOG_FILE=$LOGFILE
export REDIS_URL="unix://$SOCKET"
ls -la $TMP
env | grep REDIS
pushtrap "kill -9 $(cat $PIDFILE);rm -rf $TMP" EXIT
'';
}

0 comments on commit 1649d0d

Please sign in to comment.