Skip to content

post_release

post_release #398

Workflow file for this run

name: post_release
on:
workflow_dispatch:
workflow_run:
workflows: [ "release" ]
types:
- completed
jobs:
post_release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch'}}
steps:
- uses: actions/checkout@v4
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
with:
key: "v2"
- name: Build binary
run: cargo build
- uses: addnab/docker-run-action@v3
name: Spin up Docker Container
with:
image: iggyrs/iggy:latest
options: -d -p 8090:8090
run: /iggy/iggy-server
- name: Wait till iggy-server has bound to TCP 8090 port
timeout-minutes: 1
run: |
while ! nc -z 127.0.0.1 8090; do
sleep 1
done
sleep 1
ss -tuln | grep :8090
- name: Test Benchmark - Send
timeout-minutes: 1
run: |
./target/debug/iggy-bench --skip-server-start --warmup-time 0s send --message-batches 100 --messages-per-batch 100 tcp --server-address 127.0.0.1:8090
- name: Test Benchmark - Poll
timeout-minutes: 1
run: |
./target/debug/iggy-bench --skip-server-start --warmup-time 0s poll --message-batches 100 --messages-per-batch 100 tcp --server-address 127.0.0.1:8090
- name: Test Benchmark - Send and Poll
timeout-minutes: 1
run: |
./target/debug/iggy-bench --skip-server-start --warmup-time 0s send-and-poll --message-batches 100 --messages-per-batch 100 tcp --server-address 127.0.0.1:8090
- name: Check if number of messages is correct
timeout-minutes: 1
run: |
STATS=$(./target/debug/iggy -u iggy -p iggy stats)
echo "$STATS"
MESSAGE_COUNT=$(./target/debug/iggy -u iggy -p iggy -q stats -o json | jq '.messages_count')
readonly EXPECTED_MESSAGE_COUNT=200000
if [ "$MESSAGE_COUNT" -ne "$EXPECTED_MESSAGE_COUNT" ]; then
echo "Expected message count to be $EXPECTED_MESSAGE_COUNT, but got $MESSAGE_COUNT"
exit 1
fi
- name: Clean up
run: docker rm -f iggy_container
finalize_post_release:
runs-on: ubuntu-latest
needs: [ post_release ]
if: always()
steps:
- uses: actions/checkout@v4
- name: Everything is fine
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Something went wrong
if: ${{ contains(needs.*.result, 'failure') && github.event_name == 'workflow_run' }}
uses: JasonEtco/create-an-issue@v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_BOT_CONTEXT_STRING: "post release docker container test"
with:
filename: .github/BOT_ISSUE_TEMPLATE.md