Add unit and api tests to Earthfile
This commit is contained in:
parent
86305c3028
commit
2cd6756d01
14
Earthfile
14
Earthfile
@ -97,7 +97,6 @@ package:
|
|||||||
ARG NAME=custom
|
ARG NAME=custom
|
||||||
END
|
END
|
||||||
|
|
||||||
COPY (+build/webroot --platform $TARGETPLATFORM) /build/dist/webroot
|
|
||||||
COPY (+build/owncast --platform $TARGETPLATFORM) /build/dist/owncast
|
COPY (+build/owncast --platform $TARGETPLATFORM) /build/dist/owncast
|
||||||
COPY (+build/README.md --platform $TARGETPLATFORM) /build/dist/README.md
|
COPY (+build/README.md --platform $TARGETPLATFORM) /build/dist/README.md
|
||||||
ENV ZIPNAME owncast-$version-$NAME.zip
|
ENV ZIPNAME owncast-$version-$NAME.zip
|
||||||
@ -116,3 +115,16 @@ docker:
|
|||||||
ENTRYPOINT ["/app/owncast"]
|
ENTRYPOINT ["/app/owncast"]
|
||||||
EXPOSE 8080 1935
|
EXPOSE 8080 1935
|
||||||
SAVE IMAGE --push $image:$tag
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user