Skip to content

Commit

Permalink
Change default to ./docker-compose.yml for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Dec 11, 2021
1 parent 0c83457 commit 7b5e4c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion makefiles/test-integration.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GO ?= go
# Override in app Makefile to add custom ldflags, example BUILD_LDFLAGS="-s -w"
BUILD_LDFLAGS ?= ""
INTEGRATION_TEST_TARGET ?= -coverpkg ./internal/... integration_test.go
INTEGRATION_DOCKER_COMPOSE ?= ./docker-compose.integration-test.yml
INTEGRATION_DOCKER_COMPOSE ?= ./docker-compose.yml

## Run integration tests
test-integration:
Expand Down
3 changes: 2 additions & 1 deletion templates/github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
env:
GO111MODULE: "on"
RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing.
DOCKER_COMPOSE_FILE: "./docker-compose.yml"
jobs:
test:
strategy:
Expand Down Expand Up @@ -49,7 +50,7 @@ jobs:
ref: ${{ github.event.pull_request.base.sha }}
path: __base
- name: Docker Compose
run: (test -f ./dev/docker-compose.integration-test.yml && docker-compose -f ./dev/docker-compose.integration-test.yml up -d && docker ps && docker-compose -f ./dev/docker-compose.integration-test.yml logs) || echo "::warning ::Missing ./dev/docker-compose.integration-test.yml file"
run: (test -f ${{ env.DOCKER_COMPOSE_FILE }} && docker-compose -f ${{ env.DOCKER_COMPOSE_FILE }} up -d && docker ps && docker-compose -f ${{ env.DOCKER_COMPOSE_FILE }} logs) || echo "::warning ::Missing ${{ env.DOCKER_COMPOSE_FILE }} file"
- name: Run test for base code
if: matrix.go-version == '1.17.x' && env.RUN_BASE_COVERAGE == 'on' && steps.benchmark-base.outputs.cache-hit != 'true' && github.event.pull_request.base.sha != ''
run: |
Expand Down

0 comments on commit 7b5e4c3

Please sign in to comment.