Pass handler setting from request to result #59
Workflow file for this run
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
name: Unit test suite run | |
env: | |
# sensu container config | |
SENSU_IMAGE: bitlayer/docker-sensu:1.9.0-1 | |
TRANSPORT_NAME: rabbitmq | |
RABBITMQ_HOST: 127.0.0.1 | |
RABBITMQ_USER: guest | |
RABBITMQ_PASSWORD: "" | |
RABBITMQ_VHOST: "/sensu" | |
REDIS_HOST: 127.0.0.1 | |
REDIS_PORT: 6379 | |
# redis container config | |
REDIS_IMAGE: redis:6.2.1 | |
# rabbitmq container config | |
RABBITMQ_IMAGE: rabbitmq:3.7.24 | |
# qdr container config | |
QDROUTERD_IMAGE: quay.io/interconnectedcloud/qdrouterd:1.12.0 | |
# loki container config | |
LOKI_IMAGE: grafana/loki:2.1.0 | |
# misc. config | |
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | |
on: push | |
jobs: | |
test-framework: | |
name: Unit test suite | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Start Redis | |
run: | | |
docker run --name redis -p 6379:6379 -d $REDIS_IMAGE | |
- name: Start RabbitMQ message bus | |
run: | | |
docker run --name=rabbitmq -p 5672:5672 -p 4369:4369 -d $RABBITMQ_IMAGE | |
- name: Start qdrouterd message bus | |
run: | | |
docker run --name=qdr --volume=$PWD/ci/qdrouterd.conf:/etc/qpid-dispatch/qdrouterd.conf:ro -p 5666:5666 -d $QDROUTERD_IMAGE | |
- name: Configure RabbitMQ message bus for sensu-core usage | |
run: | | |
docker exec rabbitmq rabbitmqctl start_app | |
sleep 5 | |
docker exec rabbitmq rabbitmqctl add_vhost /sensu | |
docker exec rabbitmq rabbitmqctl set_permissions -p "/sensu" guest ".*" ".*" ".*" | |
- name: Start Sensu | |
run: | | |
docker run --name sensu-api --network host --env-file=$PWD/ci/sensu-env.sh -d $SENSU_IMAGE api | |
docker run --name sensu-server --network host --env-file=$PWD/ci/sensu-env.sh --volume=$PWD/ci/sensu/check.d:/etc/sensu/check.d:ro -d $SENSU_IMAGE server | |
- name: Start Loki | |
run: | | |
docker run --name loki --volume=$PWD/ci/loki-config.yaml:/etc/loki/loki-config.yaml:ro -p 3100:3100 -d $LOKI_IMAGE -config.file=/etc/loki/loki-config.yaml | |
- name: List dependency containers' logs | |
run: | | |
docker ps --all | |
echo "---- rabbitmq ----" | |
docker logs rabbitmq | |
echo "---- qdr ----" | |
docker logs qdr | |
echo "---- sensu-core ----" | |
docker logs sensu-server | |
docker logs sensu-api | |
echo "---- loki ----" | |
docker logs loki | |
- name: Run unit tests | |
run: | | |
export PROJECT_ROOT=/root/go/src/github.com/infrawatch/apputils | |
docker run -uroot --network host --volume=$PWD:$PROJECT_ROOT:z --workdir $PROJECT_ROOT centos:8 bash ci/run_ci.sh | |
- name: List dependency containers' logs | |
run: | | |
echo "---- rabbitmq ----" | |
docker logs rabbitmq | |
echo "---- qdr ----" | |
docker logs qdr | |
echo "---- sensu-core ----" | |
docker logs sensu-server | |
docker logs sensu-api | |
echo "---- loki ----" | |
docker logs loki | |
if: ${{ failure() }} |