Skip to content

Commit

Permalink
test: setup docker compose for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rueian committed Jan 9, 2022
1 parent ed305d1 commit 64e30c3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ jobs:
- run: chmod +x ./cc-test-reporter
- run: go get -v -t -d ./...
- run: ./cc-test-reporter before-build
- run: go test -coverprofile=./c.out -v -race ./...
- run: ./dockertest.sh
- run: ./cc-test-reporter after-build -p $(go list -m) --exit-code $?
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3.7"

services:
redis:
image: redislabs/rejson:latest
ports:
- "6379:6379"
7 changes: 7 additions & 0 deletions dockertest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

docker-compose up -d
go test -coverprofile=./c.out -v -race ./...
docker-compose down

0 comments on commit 64e30c3

Please sign in to comment.