diff --git a/.travis.yml b/.travis.yml index 209562ce..f41e6b4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,10 @@ matrix: script: - npm run lint - npm run build + - language: go dist: xenial - name: 'GoCryptoTrader [back-end] [linux]' + name: 'GoCryptoTrader [back-end] [linux] [64-bit]' go: - 1.13.x env: @@ -30,12 +31,39 @@ matrix: services: - postgresql before_script: - - psql -c 'create database gct_dev_ci;' -U postgres + - psql -c 'create database gct_dev_ci;' -U postgres script: - make check after_success: - bash <(curl -s https://codecov.io/bash) + - language: go + dist: xenial + name: 'GoCryptoTrader [back-end] [linux] [32-bit]' + go: + - 1.13.x + env: + - GO111MODULE=on + - NO_RACE_TEST=1 + - PSQL_USER=postgres + - PSQL_HOST=localhost + - PSQL_DBNAME=gct_dev_ci + install: true + cache: + directories: + - $GOPATH/pkg/mod + services: + - postgresql + before_script: + - psql -c 'create database gct_dev_ci;' -U postgres + script: + - export GOARCH=386 + - export CGO_ENABLED=1 + - sudo apt-get install gcc-multilib + - make test + after_success: + - bash <(curl -s https://codecov.io/bash) + - language: go os: osx name: 'GoCryptoTrader [back-end] [darwin]' diff --git a/Makefile b/Makefile index 1a2cb53b..7094b991 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ GCTLISTENPORT=9050 GCTPROFILERLISTENPORT=8085 CRON = $(TRAVIS_EVENT_TYPE) DRIVER ?= psql +RACE_FLAG := $(if $(NO_RACE_TEST),,-race) get: GO111MODULE=on go get $(GCTPKG) @@ -19,9 +20,9 @@ check: linter test test: ifeq ($(CRON), cron) - go test -race -tags=mock_test_off -coverprofile=coverage.txt -covermode=atomic ./... + go test $(RACE_FLAG) -tags=mock_test_off -coverprofile=coverage.txt -covermode=atomic ./... else - go test -race -coverprofile=coverage.txt -covermode=atomic ./... + go test $(RACE_FLAG) -coverprofile=coverage.txt -covermode=atomic ./... endif build: