Skip to content

Commit

Permalink
Merge pull request #3045 from esl/fix-gh-actions
Browse files Browse the repository at this point in the history
Fix gh actions
  • Loading branch information
chrzaszcz committed Mar 1, 2021
2 parents 911ca70 + 6696184 commit 2f51f6d
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 155 deletions.
139 changes: 0 additions & 139 deletions .travis.yml

This file was deleted.

16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# MongooseIM platform

[![Build Status](https://github.com/esl/MongooseIM/workflows/CI/badge.svg)](https://github.com/esl/MongooseIM/actions)
[![CircleCI](https://circleci.com/gh/esl/MongooseIM.svg?style=shield&circle-token=53cdda11cfb95bd7a7044c509c89cb73d3fdeb5a)](https://github.com/esl/MongooseIM/)
[![codecov](https://codecov.io/gh/esl/MongooseIM/branch/master/graph/badge.svg)](https://codecov.io/gh/esl/MongooseIM)
[![GitHub Actions](https://github.com/esl/MongooseIM/workflows/CI/badge.svg?branch=master)](https://github.com/esl/MongooseIM/actions?query=workflow%3ACI+branch%3Amaster)
[![CircleCI](https://circleci.com/gh/esl/MongooseIM.svg?style=shield&circle-token=53cdda11cfb95bd7a7044c509c89cb73d3fdeb5a)](https://app.circleci.com/pipelines/github/esl/MongooseIM)
[![Codecov](https://codecov.io/gh/esl/MongooseIM/branch/master/graph/badge.svg)](https://codecov.io/gh/esl/MongooseIM)
[![Coveralls](https://coveralls.io/repos/github/DenysGonchar/MongooseIM/badge.svg?branch=master)](https://coveralls.io/github/DenysGonchar/MongooseIM?branch=master)
[![GitHub release](https://img.shields.io/github/release/esl/MongooseIM.svg)](https://github.com/esl/MongooseIM/releases)


* [Getting started](https://esl.github.io/MongooseDocs/latest/user-guide/Getting-started/)
* [Developer's guide](https://esl.github.io/MongooseDocs/latest/developers-guide/Testing-MongooseIM/)
* [Packages](https://www.erlang-solutions.com/resources/download.html)
Expand Down Expand Up @@ -49,8 +49,12 @@ For a quick start just download:

Check out our test results:

* Continuous integration: [Github actions](https://github.com/esl/MongooseIM/actions?query=workflow%3ACI)
* Code coverage: [https://codecov.io/gh/esl/MongooseIM](https://codecov.io/gh/esl/MongooseIM)
* CI testing:
* [GH Actions](https://github.com/esl/MongooseIM/actions?query=workflow%3ACI)
* [CircleCI](https://app.circleci.com/pipelines/github/esl/MongooseIM)
* Code coverage:
* [Codecov](https://codecov.io/gh/esl/MongooseIM) - reported by CircleCI.
* [Coveralls](https://coveralls.io/github/esl/MongooseIM) - reported by GH Actions.

## Documentation

Expand Down
2 changes: 1 addition & 1 deletion big_tests/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
{mod_roster, "[modules.mod_roster]
backend = \"rdbms\""}]},
{mysql_redis,
[{dbs, [redis, mysql]},
[{dbs, [redis, mysql, rmq]},
{sm_backend, "\"redis\""},
{auth_method, "\"rdbms\""},
{outgoing_pools, "[outgoing_pools.redis.global_distrib]
Expand Down
15 changes: 10 additions & 5 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# MongooseIM platform

[![Build Status](https://github.com/esl/MongooseIM/workflows/CI/badge.svg)](https://github.com/esl/MongooseIM/actions)
[![CircleCI](https://circleci.com/gh/esl/MongooseIM.svg?style=shield&circle-token=53cdda11cfb95bd7a7044c509c89cb73d3fdeb5a)](https://github.com/esl/MongooseIM/)
[![codecov](https://codecov.io/gh/esl/MongooseIM/branch/master/graph/badge.svg)](https://codecov.io/gh/esl/MongooseIM)
[![GitHub Actions](https://github.com/esl/MongooseIM/workflows/CI/badge.svg?branch=master)](https://github.com/esl/MongooseIM/actions?query=workflow%3ACI+branch%3Amaster)
[![CircleCI](https://circleci.com/gh/esl/MongooseIM.svg?style=shield&circle-token=53cdda11cfb95bd7a7044c509c89cb73d3fdeb5a)](https://app.circleci.com/pipelines/github/esl/MongooseIM)
[![Codecov](https://codecov.io/gh/esl/MongooseIM/branch/master/graph/badge.svg)](https://codecov.io/gh/esl/MongooseIM)
[![Coveralls](https://coveralls.io/repos/github/DenysGonchar/MongooseIM/badge.svg?branch=master)](https://coveralls.io/github/DenysGonchar/MongooseIM?branch=master)
[![GitHub release](https://img.shields.io/github/release/esl/MongooseIM.svg)](https://github.com/esl/MongooseIM/releases)

* Home: [https://github.com/esl/MongooseIM](https://github.com/esl/MongooseIM)
Expand Down Expand Up @@ -66,8 +67,12 @@ For a quick start just download:

Check out our test results:

* Continuous integration: [Github actions](https://github.com/esl/MongooseIM/actions?query=workflow%3ACI)
* Code coverage: [https://codecov.io/gh/esl/MongooseIM](https://codecov.io/gh/esl/MongooseIM)
* CI testing:
* [GH Actions](https://github.com/esl/MongooseIM/actions?query=workflow%3ACI)
* [CircleCI](https://app.circleci.com/pipelines/github/esl/MongooseIM)
* Code coverage:
* [Codecov](https://codecov.io/gh/esl/MongooseIM) - reported by CircleCI.
* [Coveralls](https://coveralls.io/github/esl/MongooseIM) - reported by GH Actions.

## Versions

Expand Down
2 changes: 1 addition & 1 deletion src/wpool/mongoose_wpool_redis.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ wpool_spec(WpoolOptsIn, ConnOpts) ->


makeargs(RedisOpts) ->
Host = proplists:get_value(host, RedisOpts, "localhost"),
Host = proplists:get_value(host, RedisOpts, "127.0.0.1"),
Port = proplists:get_value(port, RedisOpts, 6379),
Database = proplists:get_value(database, RedisOpts, 0),
Password = proplists:get_value(password, RedisOpts, ""),
Expand Down
2 changes: 1 addition & 1 deletion tools/gh-actions-configure-preset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ case "$1" in
esac

if [ ! -z "$GITHUB_ENV" ]; then
env | egrep "^(DB|REL_CONFIG|TLS_DIST)=" >> $GITHUB_ENV
env | egrep "^(DB|REL_CONFIG|TLS_DIST|TESTSPEC)=" >> $GITHUB_ENV
fi
4 changes: 4 additions & 0 deletions tools/setup-redis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
source tools/travis-common-vars.sh
NAME=$(db_name redis)
REDIS_PORT=${REDIS_PORT:-6379}

docker rm -v -f $NAME || echo "Skip removing the previous container"
docker run -d --name $NAME \
-p $REDIS_PORT:6379 \
--health-cmd='redis-cli -h "127.0.0.1" ping' \
redis

tools/wait_for_healthcheck.sh $NAME
tools/wait_for_service.sh $NAME $REDIS_PORT
3 changes: 3 additions & 0 deletions tools/travis-setup-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ elif [ "$db" = 'ldap' ]; then
elif [ "$db" = "minio" ]; then
tools/setup_minio.sh

elif [ "$db" = "rmq" ]; then
tools/travis-setup-rmq.sh

else
echo "Skip setting up database"
fi
Expand Down
11 changes: 9 additions & 2 deletions tools/travis-setup-rmq.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#!/usr/bin/env bash

source tools/travis-common-vars.sh
NAME=$(db_name rmq)
RMQ_PORT=5672

docker rm -v -f $NAME || echo "Skip removing the previous container"
docker run -d \
--name mongooseim-rmq \
-p 5672:5672 \
--name $NAME \
-p $RMQ_PORT:5672 \
rabbitmq:3.7

tools/wait_for_service.sh $NAME $RMQ_PORT

0 comments on commit 2f51f6d

Please sign in to comment.