Merge pull request #135 from ph4r5h4d/dependabot/go_modules/github.co… #189
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: Integrations tests (App) | |
on: push | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '1.19' | |
check-latest: true | |
cache: true | |
- run: GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o wait4it | |
- name: Cache wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
Redis-TCP: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test Redis | |
run: ./wait4it -type=redis -p=6379 -t=60 -h=127.0.0.1 | |
- name: Test TCP | |
run: ./wait4it -type=tcp -h=127.0.0.1 -p=6379 -t=60 | |
PostgreSQL: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test PostgreSQL | |
run: ./wait4it -type=postgres -h=127.0.0.1 -p=5432 -t=60 -u=postgres -P=postgres -ssl=disable | |
MySQL: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: mysql | |
env: | |
MYSQL_ROOT_PASSWORD: secret | |
MYSQL_DATABASE: app | |
ports: | |
- 3306:3306 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test MySQL | |
run: ./wait4it -type=mysql -h=127.0.0.1 -p=3306 -t=60 -u=root -P=secret -n=app | |
HTTP: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: nginx | |
ports: | |
- 80:80 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test HTTP | |
run: ./wait4it -type=http -h=http://127.0.0.1/ -t=60 -status-code=200 -http-text="Welcome to nginx!" | |
MongoDB: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: mongo | |
env: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: root | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test MongoDB | |
run: ./wait4it -type=mongo -p=27017 -t=60 -u=root -P=root -h=127.0.0.1 | |
RabbitMQ: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: rabbitmq:3-management-alpine | |
ports: | |
- 5672:5672 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test RabbitMQ | |
run: ./wait4it -type=rabbitmq -p=5672 -t=60 -u=guest -P=guest -h=127.0.0.1 | |
Memcached: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: docker.io/bitnami/memcached:1 | |
ports: | |
- 11211:11211 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test Memcached | |
run: ./wait4it -type=memcached -h=127.0.0.1 -p=11211 -t=60 | |
ElasticSearch: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: docker.io/bitnami/elasticsearch:8 | |
ports: | |
- 9200:9200 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test ElasticSearch | |
run: ./wait4it -type=elasticsearch -h=http://127.0.0.1 -p=9200 -t=60 | |
Aerospike: | |
runs-on: ubuntu-latest | |
needs: build | |
services: | |
redis: | |
image: aerospike/aerospike-server-enterprise | |
ports: | |
- 3000:3000 | |
steps: | |
- name: Retrieve wait4it | |
uses: actions/cache@v3 | |
with: | |
path: wait4it | |
key: wait4it-${{ github.run_id }} | |
- name: Test Aerospike | |
run: ./wait4it -type=aerospike -h=127.0.0.1 -p=3000 -t=60 |