Add publish step to github actions

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
This commit is contained in:
Alistair Hey
2020-11-22 12:46:51 +00:00
committed by Alex Ellis
parent e3b18e6324
commit ca3d53c0a5
5 changed files with 98 additions and 10 deletions

View File

@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM:-linux/amd64} teamserverless/license-check:0.3.6 as license-check
FROM --platform=${BUILDPLATFORM:-linux/amd64} teamserverless/license-check:0.3.9 as license-check
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.13 as build
@ -68,8 +68,10 @@ ENV https_proxy ""
COPY --from=build /go/src/github.com/openfaas/faas/gateway/gateway .
COPY assets assets
RUN sed -ie s/x86_64/${GOARCH}/g assets/script/funcstore.js && \
rm assets/script/funcstore.jse
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ] ; then sed -ie s/x86_64/armhf/g assets/script/funcstore.js ; elif [ "$TARGETPLATFORM" = "linux/arm64" ] ; then sed -ie s/x86_64/arm64/g assets/script/funcstore.js; fi
RUN chown -R app:app ./

View File

@ -81,7 +81,7 @@ func Test_CacheFunctionExists(t *testing.T) {
cache := FunctionCache{
Cache: make(map[string]*FunctionMeta),
Expiry: time.Millisecond * 10,
Expiry: time.Millisecond * 100,
}
cache.Set(fnName, namespace, ServiceQueryResponse{AvailableReplicas: 1})
@ -102,7 +102,7 @@ func Test_CacheFunctionExistsWithNamespace(t *testing.T) {
cache := FunctionCache{
Cache: make(map[string]*FunctionMeta),
Expiry: time.Millisecond * 10,
Expiry: time.Millisecond * 100,
}
cache.Set(fnName, namespace, ServiceQueryResponse{AvailableReplicas: 1})
@ -123,7 +123,7 @@ func Test_CacheFunctionNotExist(t *testing.T) {
cache := FunctionCache{
Cache: make(map[string]*FunctionMeta),
Expiry: time.Millisecond * 10,
Expiry: time.Millisecond * 100,
}
cache.Set(fnName, namespace, ServiceQueryResponse{AvailableReplicas: 1})