diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index ee4ec0bd2..ccd710889 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -36,30 +36,23 @@ golangci-lint: - echo "Checking for issues in new code" - golangci-lint run -v -install lattice: - stage: test - image: node:14 - script: - - echo "Installing lattice dependencies..." - - cd lattice - - yarn install - build lattice: stage: test image: node:14 variables: - CI: "true" + CI: "false" script: - - echo "Building lattice..." - cd lattice + - yarn install - yarn build - - tar -czvf lattice.tar.gz lattice/build + - mv build ../ + - cd ../ + - rm -r lattice + - mv build lattice + - tar -czvf lattice.tar.gz lattice artifacts: paths: - - lattice/lattice.tar.gz - needs: - - job: install lattice - allow_failure: true + - lattice.tar.gz run jest tests: stage: test @@ -77,7 +70,7 @@ run jest tests: run go tests: stage: test - image: golang:1.16.9 + image: golang:1.16.10 extends: .go-cache script: - echo "Running featurebase unit tests..." @@ -86,9 +79,21 @@ run go tests: paths: - coverage.out +run go tests future: + stage: test + image: golang:1.17.3 + extends: .go-cache + script: + - echo "Running featurebase unit tests..." + - ./cover-everything.sh + artifacts: + paths: + - coverage.out + + run go tests with output: stage: test - image: golang:1.16.9 + image: golang:1.16.10 script: - echo "Running featurebase unit tests to capture JSON output..." - go test -json > test-report.out @@ -110,59 +115,59 @@ upload to sonarcloud: build for linux amd64: stage: build - image: registry.gitlab.com/molecula/featurebase/builder:0.0.3 - extends: .go-cache - variables: - GOOS: "linux" - GOARCH: "amd64" + image: golang:1.16.10 script: - - go build -o featurebase_linux_amd64 ./cmd/featurebase + - rm -r lattice + - tar -xvf lattice.tar.gz + - go get -v -u github.com/rakyll/statik + - /go/bin/statik -src=lattice + - GOOS="linux" GOARCH="amd64" make build FLAGS="-o featurebase_linux_amd64" artifacts: paths: - featurebase_linux_amd64 build for linux arm64: stage: build - image: registry.gitlab.com/molecula/featurebase/builder:0.0.3 - extends: .go-cache - variables: - GOOS: "linux" - GOARCH: "arm64" + image: golang:1.16.10 script: - - go build -o featurebase_linux_arm64 ./cmd/featurebase + - rm -r lattice + - tar -xvf lattice.tar.gz + - go get -v -u github.com/rakyll/statik + - /go/bin/statik -src=lattice + - GOOS="linux" GOARCH="arm64" make build FLAGS="-o featurebase_linux_arm64" artifacts: paths: - featurebase_linux_arm64 build for darwin amd64: stage: build - image: registry.gitlab.com/molecula/featurebase/builder:0.0.3 - extends: .go-cache - variables: - GOOS: "darwin" - GOARCH: "amd64" + image: golang:1.16.10 script: - - go build -o featurebase_darwin_amd64 ./cmd/featurebase + - rm -r lattice + - tar -xvf lattice.tar.gz + - go get -v -u github.com/rakyll/statik + - /go/bin/statik -src=lattice + - GOOS="darwin" GOARCH="amd64" make build FLAGS="-o featurebase_darwin_amd64" artifacts: paths: - featurebase_darwin_amd64 build for darwin arm64: stage: build - image: registry.gitlab.com/molecula/featurebase/builder:0.0.3 - extends: .go-cache - variables: - GOOS: "darwin" - GOARCH: "arm64" + image: golang:1.16.10 script: - - go build -o featurebase_darwin_arm64 ./cmd/featurebase + - rm -r lattice + - tar -xvf lattice.tar.gz + - go get -v -u github.com/rakyll/statik + - /go/bin/statik -src=lattice + - GOOS="darwin" GOARCH="arm64" make build FLAGS="-o featurebase_darwin_arm64" artifacts: paths: - featurebase_darwin_arm64 package for linux amd64: stage: build - image: registry.gitlab.com/molecula/featurebase/builder:0.0.3 + image: golang:1.16.10 variables: GOOS: "linux" GOARCH: "amd64"