From 18a1e89dab183c4a00313a415d2edc45db5e8a03 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 19 Feb 2025 12:02:42 +0100 Subject: [PATCH] test --- .github/workflows/ffo-test.yml | 6 +++++- Dockerfile.core | 3 ++- docker-bake.hcl | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ffo-test.yml b/.github/workflows/ffo-test.yml index d17f53b0ad..350c638f9e 100644 --- a/.github/workflows/ffo-test.yml +++ b/.github/workflows/ffo-test.yml @@ -20,4 +20,8 @@ jobs: source: . push: false targets: build - load: true \ No newline at end of file + - uses: docker/bake-action@v6 + with: + source: . + push: false + targets: lint \ No newline at end of file diff --git a/Dockerfile.core b/Dockerfile.core index 743ccfa7c0..ba69d37540 100644 --- a/Dockerfile.core +++ b/Dockerfile.core @@ -24,7 +24,8 @@ RUN make core_lint FROM scratch AS output COPY --from=build /app/zitadel . -FROM base AS unit-test +FROM base AS unit +COPY .git/ .git/ RUN make core_unit_test FROM debian:latest AS base-image diff --git a/docker-bake.hcl b/docker-bake.hcl index b77461b23a..89f9b7b554 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -81,30 +81,34 @@ target "core" { name = "core-${tgt}" inherits = ["_core"] matrix = { - tgt = ["build", "output", "lint", "image"] + tgt = ["build", "output", "lint", "image", "unit"] } output = { "build" = ["type=cacheonly"] "output" = ["type=local,dest=.build/core"] "lint" = ["type=cacheonly"] + "unit" = ["type=cacheonly"] "image" = ["type=docker"] }[tgt] tags = { "build" = [] "output" = [] "lint" = [] + "unit" = [] "image" = ["${REGISTRY}/zitadel:${GITHUB_SHA}"] }[tgt] cache-to = { "build" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"] "output" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"] "lint" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"] + "unit" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"] "image" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"] }[tgt] cache-from = { "build" = ["type=gha,scope=core-${tgt}"] "output" = ["type=gha,scope=core-${tgt}"] "lint" = ["type=gha,scope=core-${tgt}"] + "unit" = ["type=gha,scope=core-${tgt}"] "image" = ["type=gha,scope=core-${tgt}"] }[tgt] target = tgt