Update circle-ci config

This commit is contained in:
go-jet 2021-01-24 16:47:06 +01:00
parent 667d534a65
commit 92818acd50
4 changed files with 12 additions and 40 deletions

View file

@ -6,7 +6,7 @@ jobs:
build-postgres-and-mysql:
docker:
# specify the version
- image: circleci/golang:1.11
- image: circleci/golang:1.13
- image: circleci/postgres:10.8-alpine
environment: # environment variables for primary container
@ -14,7 +14,7 @@ jobs:
POSTGRES_PASSWORD: jet
POSTGRES_DB: jetdb
- image: circleci/mysql:8.0
- image: circleci/mysql:8.0.16
command: [--default-authentication-plugin=mysql_native_password]
environment:
MYSQL_ROOT_PASSWORD: jet
@ -41,17 +41,9 @@ jobs:
- run:
name: Install dependencies
command: |
go get github.com/google/uuid
go get github.com/lib/pq
go get github.com/go-sql-driver/mysql
go get github.com/pkg/profile
go get github.com/stretchr/testify/assert
go get github.com/google/go-cmp/cmp
go get github.com/davecgh/go-spew/spew
cd /go/src/github.com/go-jet/jet
go get github.com/jstemmer/go-junit-report
go install github.com/go-jet/jet/cmd/jet
go build -o /home/circleci/.local/bin/jet ./cmd/jet/
- run:
name: Waiting for Postgres to be ready
@ -95,7 +87,7 @@ jobs:
- run: mkdir -p $TEST_RESULTS
- run: go test -v ./... -coverpkg=github.com/go-jet/jet/postgres/...,github.com/go-jet/jet/mysql/...,github.com/go-jet/jet/qrm/...,github.com/go-jet/jet/generator/...,github.com/go-jet/jet/internal/... -coverprofile=cover.out 2>&1 | go-junit-report > $TEST_RESULTS/results.xml
- run: MY_SQL_SOURCE=MySQL go test -v ./... -coverpkg=github.com/go-jet/jet/postgres/...,github.com/go-jet/jet/mysql/...,github.com/go-jet/jet/qrm/...,github.com/go-jet/jet/generator/...,github.com/go-jet/jet/internal/... -coverprofile=cover.out 2>&1 | go-junit-report > $TEST_RESULTS/results.xml
- run:
name: Upload code coverage
@ -110,7 +102,7 @@ jobs:
build-mariadb:
docker:
# specify the version
- image: circleci/golang:1.11
- image: circleci/golang:1.13
- image: circleci/mariadb:10.3
command: [--default-authentication-plugin=mysql_native_password]
@ -138,17 +130,9 @@ jobs:
- run:
name: Install dependencies
command: |
go get github.com/google/uuid
go get github.com/lib/pq
go get github.com/go-sql-driver/mysql
go get github.com/pkg/profile
go get github.com/stretchr/testify/assert
go get github.com/google/go-cmp/cmp
go get github.com/davecgh/go-spew/spew
cd /go/src/github.com/go-jet/jet
go get github.com/jstemmer/go-junit-report
go install github.com/go-jet/jet/cmd/jet
go build -o /home/circleci/.local/bin/jet ./cmd/jet/
- run:
name: Install MySQL CLI;
@ -172,7 +156,7 @@ jobs:
- run:
name: Run MariaDB tests
command: |
go test -v ./tests/mysql/ -source=MariaDB
MY_SQL_SOURCE=MariaDB go test -v ./tests/mysql/
workflows:
version: 2