Skip to content

Commit

Permalink
Merge pull request #2 from kohrVid/circleci-project-setup
Browse files Browse the repository at this point in the history
Circleci project setup
  • Loading branch information
kohrVid authored Feb 14, 2022
2 parents 965d80e + 4a06236 commit a106405
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 2.1

jobs:
build:
working_directory: ~/repo
docker:
- image: cimg/go:1.17.7

- image: cimg/postgres:14.0
auth:
username: postgres
password: $DOCKERHUB_PASSWORD
environment:
POSTGRES_USER: postgres
POSTGRES_DB: pgcli_test
DATABASE_PASSWORD: $DOCKERHUB_PASSWORD

steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run:
name: Install Dependencies
command: |
export GO111MODULE=on
go mod download
go install github.com/axw/gocov/gocov@v1.0.0
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run:
name: Run tests
command: |
gocov test ./... | gocov report
workflows:
pg_cli:
jobs:
- build

0 comments on commit a106405

Please sign in to comment.