From 2cd6756d012d3c25f4d29b6a2638842667cca496 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 21 Jun 2022 12:16:44 -0700 Subject: [PATCH] Add unit and api tests to Earthfile --- Earthfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index 25ecc913e..abcaa9ea6 100644 --- a/Earthfile +++ b/Earthfile @@ -97,7 +97,6 @@ package: ARG NAME=custom END - COPY (+build/webroot --platform $TARGETPLATFORM) /build/dist/webroot COPY (+build/owncast --platform $TARGETPLATFORM) /build/dist/owncast COPY (+build/README.md --platform $TARGETPLATFORM) /build/dist/README.md ENV ZIPNAME owncast-$version-$NAME.zip @@ -116,3 +115,16 @@ docker: ENTRYPOINT ["/app/owncast"] EXPOSE 8080 1935 SAVE IMAGE --push $image:$tag + +unit-tests: + FROM --platform=linux/amd64 bdwyertech/go-crosscompile + COPY . /build + WORKDIR /build + RUN go test ./... + +api-tests: + FROM --platform=linux/amd64 bdwyertech/go-crosscompile + RUN apk add ffmpeg npm + COPY . /build + WORKDIR /build + RUN cd test/automated/api && ./run.sh