Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

performance: make travis slightly faster (#231)

Guilherme Oenning359b79ef0a48
diff --git a/.ci.env b/.ci.env
deleted file mode 100644
index 0033a2737..000000000
--- a/.ci.env
+++ /dev/null
@@ -1,11 +0,0 @@
-GO_ENV=test
-HOST_MODE=multi
-DATABASE_URL=postgres://fider_ci:fider_ci_pw@localhost:5432/fider_ci?sslmode=disable
-AUTH_ENDPOINT=http://login.test.fider.io:3000
-JWT_SECRET=SOME_RANDOM_TOKEN_JUST_FOR_TESTING
-
-SMTP_HOST=smtp.random.org
-SMTP_PORT=465
-SMTP_PASSWORD=random
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 977c973f7..dd5b882be 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,19 +9,17 @@ addons:
postgresql: "9.6"
install:
- - go get -u github.com/joho/godotenv/cmd/godotenv
- - go get -u github.com/dave/courtney
- - nvm install 8
-
-before_script:
- - psql -c 'create database fider_ci;' -U postgres
+ - go get github.com/joho/godotenv/cmd/godotenv &
+ - go get github.com/dave/courtney &
+ - nvm use 8.9
+ - psql -c 'CREATE DATABASE fider_ci;' -U postgres
- psql -c "CREATE USER fider_ci WITH PASSWORD 'fider_ci_pw';" -U postgres
script:
- npm install
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build
- make lint
- - make coverage
+ - DATABASE_URL=postgres://fider_ci:fider_ci_pw@localhost:5432/fider_ci?sslmode=disable make coverage
- docker build -t getfider/fider .
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- |
diff --git a/Makefile b/Makefile
index 5a3b764f6..1bda2089b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,5 @@
BUILD_TIME=$(shell date +"%Y.%m.%d.%H%M%S")
-ENV_FILE=.test.env
-
-ifeq ($(TRAVIS), true)
-ENV_FILE=.ci.env
-endif
-
-
# Building
build:
rm -rf dist
@@ -18,10 +11,10 @@ lint:
# Testing
test:
- godotenv -f ${ENV_FILE} go test ./... -cover -p=1
+ godotenv -f .test.env go test ./... -cover -p=1
coverage:
- godotenv -f ${ENV_FILE} courtney -o cover.out $$(go list ./...)
+ godotenv -f .test.env courtney -o cover.out $$(go list ./...)
e2e:
./scripts/e2e.sh