From 2baad77c5a4624f4840d4a4d978564c235d2909e Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Mon, 20 Jun 2022 08:03:57 -0700 Subject: [PATCH] Support running tests within Earthly container --- Earthfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Earthfile b/Earthfile index f317c5c34..98f3554d3 100644 --- a/Earthfile +++ b/Earthfile @@ -127,3 +127,14 @@ docker: ENTRYPOINT ["/app/owncast"] EXPOSE 8080 1935 SAVE IMAGE --push $image:$tag + +api-tests: + FROM --platform=linux/amd64 +code + WORKDIR /build + RUN apk add npm ffmpeg + RUN cd test/automated/api && npm install && ./run.sh + +unit-tests: + FROM --platform=linux/amd64 +code + WORKDIR /build + RUN go test ./...