Skip to content

Commit

Permalink
Update unit test download package
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdul Rabbani committed May 31, 2022
1 parent cf8c08f commit c556845
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ jobs:
- name: Trigger Unit Test
run: |
ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} go install github.com/onsi/ginkgo/v2/ginkgo@latest
ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} chmod +x /tmp/run_unit_test.sh /tmp/run_unit_test.sh
ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} go install github.com/onsi/ginkgo/ginkgo@latest
ssh -o 'StrictHostKeyChecking no' -o UserKnownHostsFile=/dev/null -q -i /tmp/key ${{ env.BUILD_USERNAME }}@${{ env.BUILD_HOSTNAME }} /tmp/run_unit_test.sh
- name: Get the logs and cat them
Expand Down
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ BASE = $(GOPATH)/src/$(PACKAGE)
PKGS = go list ./... | grep -v "^vendor/"

# Tools
## Testing library
GINKGO = $(BIN)/ginkgo
$(BIN)/ginkgo:
go run github.com/onsi/ginkgo/ginkgo

## Migration tool
GOOSE = $(BIN)/goose
Expand All @@ -26,7 +22,7 @@ $(BIN)/gometalinter.v2:


.PHONY: installtools
installtools: | $(LINT) $(GOOSE) $(GINKGO)
installtools: | $(LINT) $(GOOSE)
echo "Installing tools"
go mod download

Expand Down Expand Up @@ -55,19 +51,19 @@ TEST_CONNECT_STRING = postgresql://$(DATABASE_USER):$(DATABASE_PASSWORD)@$(DATAB
TEST_CONNECT_STRING_LOCAL = postgresql://$(USER)@$(HOST_NAME):$(PORT)/$(TEST_DB)?sslmode=disable

.PHONY: test
test: | $(GINKGO) $(GOOSE)
test: | $(GOOSE)
go vet ./...
go fmt ./...
$(GINKGO) -r --skipPackage=test
go run github.com/onsi/ginkgo/ginkgo -r --skipPackage=test

.PHONY: integrationtest
integrationtest: | $(GINKGO) $(GOOSE)
integrationtest: | $(GOOSE)
go vet ./...
go fmt ./...
$(GINKGO) -r test/ -v
go run github.com/onsi/ginkgo/ginkgo -r test/ -v

.PHONY: test_local
test_local: | $(GINKGO) $(GOOSE)
test_local: | $(GOOSE)
go vet ./...
go fmt ./...
./scripts/run_unit_test.sh
Expand Down

0 comments on commit c556845

Please sign in to comment.