Skip to content

Commit

Permalink
fix(e2e): Switch from Docker Compose v1 to V2 due to https://github.b…
Browse files Browse the repository at this point in the history
  • Loading branch information
rkettelerij committed Aug 8, 2024
1 parent 5161820 commit f7b0759
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,23 @@ jobs:
steps:
- uses: actions/checkout@v3

# Build a local test image for re-use across end-to-end tests
# Build a local test image for (potential) re-use across end-to-end tests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
- name: Verify Docker install
run: docker compose --version
- name: Build test image
uses: docker/build-push-action@v5
with:
push: false
tags: gokoala:local

# E2E Test
# E2E Test (Docker Compose V2 can't re-use image, so build it but skip unit tests).
- name: E2E Test => OGC API Features with Azure GeoPackage
run: |
docker compose --compatibility -f ./examples/docker-compose-features-azure.yaml pull \
&& \
docker compose --compatibility -f ./examples/docker-compose-features-azure.yaml up \
--no-build --exit-code-from smoketest
docker compose build --build-arg="TEST_CMD=;" gokoala && \
docker compose -f ./examples/docker-compose-features-azure.yaml up \
--exit-code-from smoketest
- name: Start GoKoala test instance
run: |
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN npm run build
FROM docker.io/golang:1.22-bookworm AS build-env
WORKDIR /go/src/service
ADD . /go/src/service
ARG TEST_CMD="go test -short ./..."

# enable cgo in order to interface with sqlite
ENV CGO_ENABLED=1
Expand All @@ -27,7 +28,7 @@ RUN hack/build-controller-gen.sh
# build & test the binary with debug information removed.
RUN go mod download all && \
go generate -v ./... && \
go test -short ./... && \
${TEST_CMD} && \
go build -v -ldflags '-w -s' -a -installsuffix cgo -o /gokoala github.com/PDOK/gokoala/cmd

# delete all go files (and testdata dirs) so only assets/templates/etc remain, since in a later
Expand Down
3 changes: 0 additions & 3 deletions examples/docker-compose-features-azure.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
version: "3"

services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite:3.29.0
Expand Down Expand Up @@ -42,7 +40,6 @@ services:
retries: 30

gokoala:
image: gokoala:local # run local image if available (used in CI)
build:
context: ../
dockerfile: Dockerfile
Expand Down

0 comments on commit f7b0759

Please sign in to comment.