add Dockerfile to pre-install mage
All checks were successful
Tests / test (pull_request) Successful in 59s

This commit is contained in:
Dan Anglin 2024-08-17 17:21:28 +01:00
parent d9f5215462
commit 08981319e1
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
2 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1,14 @@
# syntax=docker/dockerfile:1
FROM golang:1.23.0 AS builder
RUN git clone https://github.com/magefile/mage \
&& cd mage \
&& git checkout v1.15.0 \
&& go run bootstrap.go
FROM golang:1.23.0-alpine
COPY --from=builder /go/bin/mage /go/bin/mage
ENTRYPOINT ["mage"]

View file

@ -3,9 +3,9 @@ name: "Testing"
description: "Performs unit and lint tests for Enbas with mage" description: "Performs unit and lint tests for Enbas with mage"
runs: runs:
using: "docker" using: "docker"
image: "docker://golang:1.23.0-alpine" image: "Dockerfile"
env: env:
ENBAS_TEST_VERBOSE: "1" ENBAS_TEST_VERBOSE: "1"
ENBAS_TEST_COVER: "1" ENBAS_TEST_COVER: "1"
pre-entrypoint: "go version" pre-entrypoint: "go version"
entrypoint: "go run magefiles/main.go -v test" entrypoint: "mage -v test"