Skip to content

4727 feat: [GOLIUM][MongoDB] Create_generic_code_working_MongoDB #572

4727 feat: [GOLIUM][MongoDB] Create_generic_code_working_MongoDB

4727 feat: [GOLIUM][MongoDB] Create_generic_code_working_MongoDB #572

Workflow file for this run

name: Golium CI pipeline
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build and Test (Golium Go ${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ["1.19", "1.20"]
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_REGION: eu-west-1
ENVIRONMENT: ci
services:
mongo:
image: mongo:4.4.4
env:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongoadmin
options: >-
--health-cmd "echo 'db.stats().ok' | mongo localhost:27017/mongoadmin --quiet"
--health-interval 10s
--health-timeout 10s
--health-retries 10
ports:
- 27017:27017
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
rabbit:
image: rabbitmq:3.8.3
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5
elasticsearch:
image: elasticsearch:7.12.0
ports:
- 9200:9200
options: >-
-e="discovery.type=single-node"
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 5
minio:
image: lazybit/minio
ports:
- 9999:9000
env:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
volumes:
- ${{ github.workspace }}/../data:/data
options: --name=minio --health-cmd "curl http://localhost:9000/minio/health/live"
httpbin:
image: kennethreitz/httpbin
ports:
- 80:80
steps:
- uses: actions/checkout@v3.5.2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...