mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-09 14:41:02 +00:00
Merge pull request #1870 from molecula/gitlab-ci-parity
add race and shardwidth22 tests to gitlab
This commit is contained in:
commit
50f798cb18
2 changed files with 30 additions and 9 deletions
|
|
@ -12,7 +12,7 @@ include:
|
|||
- .go/pkg/mod/
|
||||
|
||||
variables:
|
||||
GOVERSION: "1.16.10"
|
||||
GOVERSION: "1.16.13"
|
||||
|
||||
stages:
|
||||
- lint
|
||||
|
|
@ -76,15 +76,34 @@ run go tests:
|
|||
- if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"'
|
||||
script:
|
||||
- echo "Running featurebase unit tests..."
|
||||
- PKG_LIST=$(go list ./... | grep -v internal/clustertests | paste -s -d, -)
|
||||
- go test -coverprofile=coverage.out -covermode=atomic -coverpkg=${PKG_LIST} ./...
|
||||
artifacts:
|
||||
paths:
|
||||
- coverage.out
|
||||
- go test ./...
|
||||
|
||||
run go tests race:
|
||||
stage: test
|
||||
image: golang:$GOVERSION
|
||||
extends: .go-cache
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"'
|
||||
script:
|
||||
- echo "Running featurebase race tests..."
|
||||
- go test -race -timeout=30m ./...
|
||||
|
||||
run go tests shardwidth22:
|
||||
stage: test
|
||||
image: golang:$GOVERSION
|
||||
extends: .go-cache
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"'
|
||||
script:
|
||||
- echo "Running featurebase race tests..."
|
||||
- go test -tags=shardwidth22 ./...
|
||||
|
||||
# we do coverage reporting from the future tests because the json
|
||||
# output is very difficult to human-read. The alternative would be to
|
||||
# run the regular tests twice and also run the future tests.
|
||||
run go tests future:
|
||||
stage: test
|
||||
image: golang:1.17.3
|
||||
image: golang:1.17.6
|
||||
extends: .go-cache
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"'
|
||||
|
|
@ -107,7 +126,7 @@ upload to sonarcloud:
|
|||
script:
|
||||
- sonar-scanner -Dsonar.projectKey=molecula_featurebase -Dsonar.organization=molecula -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.go.coverage.reportPaths=coverage.out -Dsonar.go.tests.reportPaths=test-report.out -Dsonar.javascript.lcov.reportPaths=lattice/coverage/lcov.info
|
||||
needs:
|
||||
- job: run go tests
|
||||
- job: run go tests future
|
||||
- job: run jest tests
|
||||
|
||||
build for linux amd64:
|
||||
|
|
@ -211,6 +230,7 @@ build container fb:
|
|||
# 3. make sure docker/docker-compose is installed
|
||||
# 4. make sure the git config is done `git config --global --add url."ssh://git@github.com/".insteadOf "https://github.com/"`
|
||||
# 5. Add deploy key github.com/molecula/featurebase/settings/keys and add public key in .ssh folder of gitlab-runner user
|
||||
# TODO: (I think) get clustertests coverage added to coverage report
|
||||
clustertests:
|
||||
stage: integration
|
||||
tags:
|
||||
|
|
@ -224,6 +244,7 @@ clustertests:
|
|||
external lookup tests:
|
||||
stage: integration
|
||||
image: golang:$GOVERSION
|
||||
# TODO: no rules here, do we need to add the rules line?
|
||||
variables:
|
||||
POSTGRES_DB: $POSTGRES_DB
|
||||
POSTGRES_USER: $POSTGRES_USER
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import (
|
|||
const PQLVersion = "1.0"
|
||||
|
||||
// DefaultShardWidth is used if an index doesn't have it defined.
|
||||
const DefaultShardWidth = 1 << 20
|
||||
const DefaultShardWidth = pilosa.ShardWidth
|
||||
|
||||
const maxHosts = 10
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue