diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 06503083e..474ae56e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,7 @@ -image: funcy/go-dind:latest +image: docker:latest + +services: + - docker:dind cache: key: "$CI_COMMIT_REF_NAME" @@ -18,13 +21,13 @@ before_script: build_job: stage: build script: - - go build -o functions-alpine + - make docker-build build_job_fn: stage: build script: - cd fn - - go build -o fn-alpine + - make build formatting: stage: build diff --git a/fn/Makefile b/fn/Makefile index 53c6ce053..db63d651d 100644 --- a/fn/Makefile +++ b/fn/Makefile @@ -16,7 +16,6 @@ dep-up: glide up -v test: - go test $(go list ./... | grep -v /vendor/ | grep -v /tests) ./test.sh test-integration: diff --git a/fn/test.sh b/fn/test.sh index 869e9c989..671bc7837 100755 --- a/fn/test.sh +++ b/fn/test.sh @@ -4,11 +4,13 @@ make build export fn="$(pwd)/fn" $fn --version +go test $(go list ./... | grep -v /vendor/ | grep -v /tests) + # This tests all the quickstart commands on the cli on a live server rm -rf tmp mkdir tmp cd tmp -funcname="tn-test-go" +funcname="fn-test-go" $fn init --runtime go $DOCKER_USERNAME/$funcname $fn test @@ -20,8 +22,9 @@ sleep 10 export API_URL="http://localhost:$someport" $fn apps l $fn apps create myapp +$fn apps l $fn deploy myapp -$fn call myapp $DOCKER_USERNAME/$funcname +$fn call myapp $funcname docker rm --force functions