Skip to content

212/fix-infinite-hangs #635

212/fix-infinite-hangs

212/fix-infinite-hangs #635

Workflow file for this run

name: Tests
on:
push:
branches:
- "*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
rust: [ stable ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
tags: rabbitmq_tls:latest
outputs: type=docker,dest=/tmp/rabbitmq_tls.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: rabbitmq_tls
path: /tmp/rabbitmq_tls.tar
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: rabbitmq_tls
path: /tmp
- name: Load image
run: |
docker load --input /tmp/rabbitmq_tls.tar
docker image ls -a
docker run -d --rm --name rabbitmq-stream-client-test \
-p 5552:5552 -p 5672:5672 -p 5671:5671 -p 5551:5551 -p 15672:15672 \
-e RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-rabbitmq_stream advertised_host localhost" \
rabbitmq_tls
- name: wait for running
run: |
docker exec rabbitmq-stream-client-test /bin/bash -c 'ps -aux'
docker exec rabbitmq-stream-client-test /bin/bash -c 'sleep 10'
docker exec rabbitmq-stream-client-test /bin/bash -c 'rabbitmqctl status'
docker exec rabbitmq-stream-client-test /bin/bash -c 'rabbitmqctl wait --pid 1 --timeout 70'
- name: Install latest ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt
- name: List files
run: ls -la
- name: Run tests
run: make test
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --ignore-filename-regex benchmark
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true