diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 486c06d..231c5d9 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,13 +1,5 @@ name: golangci-lint -on: - push: - tags: - - v* - branches: - - main - pull_request: - branches: - - main +on: push jobs: golangci: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9fa20aa..ebb31f5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,4 +33,4 @@ jobs: docker login aerospike.jfrog.io --username ${{ secrets.JFROG_USERNAME }} --password ${{ secrets.JFROG_ACCESS_TOKEN }} - name: Run tests run: | - make test \ No newline at end of file + FAIL_FAST=true make test \ No newline at end of file diff --git a/Makefile b/Makefile index 915859f..a95110d 100644 --- a/Makefile +++ b/Makefile @@ -499,6 +499,9 @@ macos-pkg-notarize: ### make cleanall && make build-prerelease && make pkg-linux && make pkg-windows-zip && make macos-build-all && make macos-notarize-all ### make cleanall && make build-official && make pkg-linux && make pkg-windows-zip && make macos-build-all && make macos-notarize-all +# set var fail fast to value of env var or to true by default +FAIL_FAST ?= false + .PHONY: test test: integration unit @@ -508,7 +511,13 @@ test-large: integration-large unit .PHONY: integration integration: mkdir -p $(COV_INTEGRATION_DIR) || true - COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m + if [ "$(FAIL_FAST)" = "true" ]; then \ + COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -failfast -tags=integration -timeout 30m ; \ + else \ + COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m ; \ + fi + +# COVERAGE_DIR=$(COV_INTEGRATION_DIR) go test -tags=integration -timeout 30m .PHONY: integration-large integration-large: diff --git a/e2e_test.go b/e2e_test.go index 527a072..1ef656c 100644 --- a/e2e_test.go +++ b/e2e_test.go @@ -408,9 +408,9 @@ func (suite *CmdTestSuite) TestPipeFromListIndexToCreateIndex() { logger.Debug(string(output)) if tc.createFail && err == nil { - suite.FailNowf("expected create cmd to fail because at least one index failed to be created", "%v", err) + suite.Failf("expected create cmd to fail because at least one index failed to be created", "%v", err) } else if !tc.createFail && err != nil { - suite.FailNowf("expected create cmd to succeed because all indexes were created", "%v : %s", err.Error(), output) + suite.Failf("expected create cmd to succeed because all indexes were created", "%v : %s", err.Error(), output) } // Cleanup list and sed commands