From 2ca267d33974f512b9b53e2c8bb99ae14395c90e Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Tue, 5 Apr 2022 08:59:27 +0200 Subject: [PATCH 01/53] Update travis to latest golang versions --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 77c04702..35734be8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,10 @@ go: - 1.12.x - 1.13.x - 1.14.x + - 1.15.x + - 1.16.x + - 1.17.x + - 1.18.x - tip jobs: exclude: # Excluded for power support as the lower versions are not supported From e95c27926ac22798b5c65a331e3f4bd03f4f421e Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Tue, 5 Apr 2022 09:30:10 +0200 Subject: [PATCH 02/53] Add .circleci/config.yml --- .circleci/config.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..1b9032bc --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,42 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + build: + working_directory: ~/repo + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: circleci/golang:1.15.8 + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - restore_cache: + keys: + - go-mod-v4-{{ checksum "go.sum" }} + - run: + name: Install Dependencies + command: go mod download + - save_cache: + key: go-mod-v4-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" + - run: + name: Run tests + command: | + mkdir -p /tmp/test-reports + gotestsum --junitfile /tmp/test-reports/unit-tests.xml + - store_test_results: + path: /tmp/test-reports + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + sample: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - build From a6a23a940fa59ac36a674b1b3f544c35347b42e6 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Tue, 5 Apr 2022 09:41:11 +0200 Subject: [PATCH 03/53] Switching to CircleCI --- .travis.yml | 27 --------------------------- go.mod | 3 +++ 2 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 .travis.yml create mode 100644 go.mod diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 77c04702..00000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: go -arch: - - amd64 - - ppc64le -go: - - 1.2.x - - 1.3.x - - 1.4.x - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - tip -jobs: - exclude: # Excluded for power support as the lower versions are not supported - - arch: ppc64le - go: 1.2.x - - arch: ppc64le - go: 1.3.x - - arch: ppc64le - go: 1.4.x diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..5160ad04 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/emirpasic/gods + +go 1.2 From 1ecec7b3bc5cc9e8e080005a7b9bacc1ec2123fb Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Tue, 5 Apr 2022 09:44:49 +0200 Subject: [PATCH 04/53] Switching to CircleCI --- .circleci/config.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1b9032bc..bcd16478 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,16 +15,6 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - checkout - - restore_cache: - keys: - - go-mod-v4-{{ checksum "go.sum" }} - - run: - name: Install Dependencies - command: go mod download - - save_cache: - key: go-mod-v4-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" - run: name: Run tests command: | From bf2f98b8a3031a0a4c9e3a821ab9cd718789b6b9 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 10:57:57 +0200 Subject: [PATCH 05/53] Switching to CircleCI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7346b994..34c2febc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GoDoc](https://godoc.org/github.com/emirpasic/gods?status.svg)](https://godoc.org/github.com/emirpasic/gods) [![Build Status](https://travis-ci.org/emirpasic/gods.svg)](https://travis-ci.org/emirpasic/gods) [![Go Report Card](https://goreportcard.com/badge/github.com/emirpasic/gods)](https://goreportcard.com/report/github.com/emirpasic/gods) [![PyPI](https://img.shields.io/pypi/l/Django.svg?maxAge=2592000)](https://github.com/emirpasic/gods/blob/master/LICENSE) +[![GoDoc](https://godoc.org/github.com/emirpasic/gods?status.svg)](https://godoc.org/github.com/emirpasic/gods) [![Build Status](https://circleci.com/gh/emirpasic/gods.svg?style=svg)](https://circleci.com/gh/emirpasic/gods) [![Go Report Card](https://goreportcard.com/badge/github.com/emirpasic/gods)](https://goreportcard.com/report/github.com/emirpasic/gods) [![PyPI](https://img.shields.io/pypi/l/Django.svg?maxAge=2592000)](https://github.com/emirpasic/gods/blob/master/LICENSE) # GoDS (Go Data Structures) From bf2ab81353858afb1c7887918f246b430bf97f5b Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 11:08:43 +0200 Subject: [PATCH 06/53] Switching to CircleCI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34c2febc..035fc341 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GoDoc](https://godoc.org/github.com/emirpasic/gods?status.svg)](https://godoc.org/github.com/emirpasic/gods) [![Build Status](https://circleci.com/gh/emirpasic/gods.svg?style=svg)](https://circleci.com/gh/emirpasic/gods) [![Go Report Card](https://goreportcard.com/badge/github.com/emirpasic/gods)](https://goreportcard.com/report/github.com/emirpasic/gods) [![PyPI](https://img.shields.io/pypi/l/Django.svg?maxAge=2592000)](https://github.com/emirpasic/gods/blob/master/LICENSE) +[![GoDoc](https://godoc.org/github.com/emirpasic/gods?status.svg)](https://godoc.org/github.com/emirpasic/gods) [![Build Status](https://circleci.com/gh/emirpasic/gods/tree/master.svg?style=shield)](https://circleci.com/gh/emirpasic/gods?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/emirpasic/gods)](https://goreportcard.com/report/github.com/emirpasic/gods) [![PyPI](https://img.shields.io/pypi/l/Django.svg?maxAge=2592000)](https://github.com/emirpasic/gods/blob/master/LICENSE) # GoDS (Go Data Structures) From 7168f7acb71320473cc38013e66c09e11dc7d302 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 11:34:35 +0200 Subject: [PATCH 07/53] Switching to CircleCI --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index bcd16478..44bb201d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,16 @@ jobs: command: | mkdir -p /tmp/test-reports gotestsum --junitfile /tmp/test-reports/unit-tests.xml + - run: + name: Lint + command: | + go get github.com/golang/lint/golint + golint -set_exit_status <> + - run: + name: Calculate cyclomatic complexity + command: | + go get github.com/fzipp/gocyclo + gocyclo -avg -over 15 . - store_test_results: path: /tmp/test-reports From bc06b657429f7c64cf16980e262dadc83ca656c0 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 17:45:46 +0200 Subject: [PATCH 08/53] Switching to CircleCI --- .circleci/config.yml | 52 ++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 44bb201d..6c96382b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,42 +1,52 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - build: - working_directory: ~/repo - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + test: + working_directory: /go/src/github.com/emirpasic/gods docker: - - image: circleci/golang:1.15.8 - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps + - image: circleci/golang:<> steps: - checkout - run: - name: Run tests + name: Print Go version (go version) + command: | + go version + - run: + name: Run tests (gotestsum) command: | mkdir -p /tmp/test-reports gotestsum --junitfile /tmp/test-reports/unit-tests.xml - run: - name: Lint + name: Lint (golint) command: | - go get github.com/golang/lint/golint + go install github.com/golang/lint/golint@latest golint -set_exit_status <> - run: - name: Calculate cyclomatic complexity + name: Enforce formatted code (go fmt) + command: | + ! go fmt <> 2>&1 | read + - run: + name: Examine and report suspicious constructs (go vet) command: | - go get github.com/fzipp/gocyclo + go vet -v <> + - run: + name: Calculate cyclomatic complexity (gocyclo) + command: | + go install github.com/fzipp/gocyclo@latest gocyclo -avg -over 15 . + - run: + name: Check for unchecked errors (errcheck) + command: | + go install github.com/kisielk/errcheck@latest + errcheck <> - store_test_results: path: /tmp/test-reports -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: - sample: # This is the name of the workflow, feel free to change it to better match your workflow. - # Inside the workflow, you define the jobs you want to run. + test: jobs: - - build + - test: + matrix: + parameters: + version: ["latest", "1.18", "1.17", "1.2"] +# version: ["latest", "1.18", "1.17", "1.16", "1.15", "1.14", "1.13", "1.12", "1.11", "1.10", "1.9", "1.8", "1.7", "1.6", "1.5", "1.4", "1.3", "1.2"] \ No newline at end of file From bd369902f671d340060016e44cb554daf15095aa Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:01:44 +0200 Subject: [PATCH 09/53] Switching to CircleCI --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c96382b..88b64cbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,10 @@ version: 2.1 jobs: test: + parameters: + version: + type: string + default: "latest" working_directory: /go/src/github.com/emirpasic/gods docker: - image: circleci/golang:<> From ff2f625e52a8122a9c584a9ecbbc56fea39f372c Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:03:28 +0200 Subject: [PATCH 10/53] Switching to CircleCI --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 88b64cbc..bfd08373 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,15 +24,15 @@ jobs: name: Lint (golint) command: | go install github.com/golang/lint/golint@latest - golint -set_exit_status <> + golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) command: | - ! go fmt <> 2>&1 | read + ! go fmt ./... 2>&1 | read - run: name: Examine and report suspicious constructs (go vet) command: | - go vet -v <> + go vet -v ./... - run: name: Calculate cyclomatic complexity (gocyclo) command: | @@ -42,7 +42,7 @@ jobs: name: Check for unchecked errors (errcheck) command: | go install github.com/kisielk/errcheck@latest - errcheck <> + errcheck ./... - store_test_results: path: /tmp/test-reports From 85aee54be6d00a8887d92f4d762b342fdd7e9854 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:06:05 +0200 Subject: [PATCH 11/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bfd08373..3f5a9104 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: default: "latest" working_directory: /go/src/github.com/emirpasic/gods docker: - - image: circleci/golang:<> + - image: cimg/go:<> steps: - checkout - run: From 550e1ae8aa3c5b2b6989d16003142c66276583c7 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:12:01 +0200 Subject: [PATCH 12/53] Switching to CircleCI --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f5a9104..2cfbd380 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,9 +6,9 @@ jobs: version: type: string default: "latest" - working_directory: /go/src/github.com/emirpasic/gods + working_directory: ~/gods docker: - - image: cimg/go:<> + - image: circleci/golang:<> steps: - checkout - run: @@ -52,5 +52,4 @@ workflows: - test: matrix: parameters: - version: ["latest", "1.18", "1.17", "1.2"] -# version: ["latest", "1.18", "1.17", "1.16", "1.15", "1.14", "1.13", "1.12", "1.11", "1.10", "1.9", "1.8", "1.7", "1.6", "1.5", "1.4", "1.3", "1.2"] \ No newline at end of file + version: ["1.18", "1.17", "1.10"] \ No newline at end of file From 3b09037abdde86e9191f0d8a3e3359d498278063 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:13:12 +0200 Subject: [PATCH 13/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2cfbd380..79430814 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: default: "latest" working_directory: ~/gods docker: - - image: circleci/golang:<> + - image: cimg/go:<> steps: - checkout - run: From 65063055ad3c53096f0452aa7952119c7d420a7b Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:23:04 +0200 Subject: [PATCH 14/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79430814..b4866b4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: - run: name: Lint (golint) command: | - go install github.com/golang/lint/golint@latest + go install golang.org/x/lint/golint@latest golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) From 522b95113b4e43720cadd77e1aaf6c95fdb7f4ec Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:28:29 +0200 Subject: [PATCH 15/53] Switching to CircleCI --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4866b4e..fcc813ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,8 +36,8 @@ jobs: - run: name: Calculate cyclomatic complexity (gocyclo) command: | - go install github.com/fzipp/gocyclo@latest - gocyclo -avg -over 15 . + go install github.com/fzipp/gocyclo/cmd/gocyclo@latest + gocyclo -avg -over 15 ../gods - run: name: Check for unchecked errors (errcheck) command: | From a0035b3f6e7db4446b1539e5a9855c054244ac8b Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:38:30 +0200 Subject: [PATCH 16/53] Switching to CircleCI --- .circleci/config.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fcc813ae..1d9cc730 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,8 @@ jobs: working_directory: ~/gods docker: - image: cimg/go:<> + environment: + TEST_RESULTS: /tmp/test-results steps: - checkout - run: @@ -16,10 +18,14 @@ jobs: command: | go version - run: - name: Run tests (gotestsum) - command: | - mkdir -p /tmp/test-reports - gotestsum --junitfile /tmp/test-reports/unit-tests.xml + name: Run tests and calculate coverage + command: | + mkdir -p $TEST_RESULTS + go test -coverprofile=c.out + go tool cover -html=c.out -o coverage.html + mv coverage.html $TEST_RESULTS + go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json + gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: name: Lint (golint) command: | From 97f1ce01d44c4af44eda349ef0592d1319c8e0aa Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:39:37 +0200 Subject: [PATCH 17/53] Switching to CircleCI --- .circleci/config.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d9cc730..15e74e68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,13 +19,13 @@ jobs: go version - run: name: Run tests and calculate coverage - command: | - mkdir -p $TEST_RESULTS - go test -coverprofile=c.out - go tool cover -html=c.out -o coverage.html - mv coverage.html $TEST_RESULTS - go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json - gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml + command: | + mkdir -p $TEST_RESULTS + go test -coverprofile=c.out + go tool cover -html=c.out -o coverage.html + mv coverage.html $TEST_RESULTS + go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json + gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: name: Lint (golint) command: | From d732d41ff91b13f51c01a24c42d3671d018de135 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:41:29 +0200 Subject: [PATCH 18/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15e74e68..969ccd2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: name: Run tests and calculate coverage command: | mkdir -p $TEST_RESULTS - go test -coverprofile=c.out + go test -coverprofile=c.out ./... go tool cover -html=c.out -o coverage.html mv coverage.html $TEST_RESULTS go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json From c829b322e8cb4482709a052736ede18f51b4ebf6 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:45:45 +0200 Subject: [PATCH 19/53] Switching to CircleCI --- .circleci/config.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 969ccd2d..ac2e6751 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,14 +18,17 @@ jobs: command: | go version - run: - name: Run tests and calculate coverage + name: Run tests + command: | + go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json + gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml + - run: + name: Calculate test coverage command: | mkdir -p $TEST_RESULTS - go test -coverprofile=c.out ./... + go test -coverprofile=c.out ./... > /dev/null go tool cover -html=c.out -o coverage.html mv coverage.html $TEST_RESULTS - go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json - gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: name: Lint (golint) command: | From 2cdadcd618b69de7c9557fff8072e62edffea3fa Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:46:38 +0200 Subject: [PATCH 20/53] Switching to CircleCI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index ac2e6751..5f730249 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,7 @@ jobs: - run: name: Run tests command: | + mkdir -p $TEST_RESULTS go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: From 662feda68150887c24f94455d808dc951a356b04 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:48:45 +0200 Subject: [PATCH 21/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f730249..ba587d63 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: docker: - image: cimg/go:<> environment: - TEST_RESULTS: /tmp/test-results + TEST_RESULTS: /tmp/test-reports steps: - checkout - run: From bba4a1d8e9409472a0cd31f28bc7065bb38cf12e Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 18:51:29 +0200 Subject: [PATCH 22/53] Switching to CircleCI --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ba587d63..6f00ff61 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: docker: - image: cimg/go:<> environment: - TEST_RESULTS: /tmp/test-reports + TEST_RESULTS: /tmp/test-results steps: - checkout - run: @@ -53,8 +53,11 @@ jobs: command: | go install github.com/kisielk/errcheck@latest errcheck ./... + - store_artifacts: + path: /tmp/test-results + destination: raw-test-output - store_test_results: - path: /tmp/test-reports + path: /tmp/test-results workflows: test: From d54e8a49d89d3f8676049f4cd1417c5dfecbd48c Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 19:15:14 +0200 Subject: [PATCH 23/53] Switching to CircleCI --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f00ff61..8ed5746c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,11 +6,14 @@ jobs: version: type: string default: "latest" - working_directory: ~/gods docker: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results + GOROOT: "" + GOPATH: "${HOME}/${CIRCLE_PROJECT_REPONAME}" + REPO_PATH: "${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" + working_directory: ${CIRCLE_PROJECT_REPONAME} steps: - checkout - run: @@ -47,7 +50,7 @@ jobs: name: Calculate cyclomatic complexity (gocyclo) command: | go install github.com/fzipp/gocyclo/cmd/gocyclo@latest - gocyclo -avg -over 15 ../gods + gocyclo -avg -over 15 ../${CIRCLE_PROJECT_REPONAME} - run: name: Check for unchecked errors (errcheck) command: | From 62c8f37a00f6ca95d983db891f10f42ff19a0ad1 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 19:55:47 +0200 Subject: [PATCH 24/53] Switching to CircleCI --- .circleci/config.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ed5746c..4f5a8fbd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,15 +5,14 @@ jobs: parameters: version: type: string - default: "latest" + default: latest docker: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results - GOROOT: "" - GOPATH: "${HOME}/${CIRCLE_PROJECT_REPONAME}" - REPO_PATH: "${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" - working_directory: ${CIRCLE_PROJECT_REPONAME} + GOPATH: ${HOME}/go + REPO_PATH: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} + working_directory: $CIRCLE_PROJECT_REPONAME steps: - checkout - run: From bb331d1e99c533cd50a1ad0a59ba1a38c510b14d Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 19:58:14 +0200 Subject: [PATCH 25/53] Switching to CircleCI --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f5a8fbd..74a49599 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,13 +12,14 @@ jobs: TEST_RESULTS: /tmp/test-results GOPATH: ${HOME}/go REPO_PATH: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} - working_directory: $CIRCLE_PROJECT_REPONAME + working_directory: ${REPO_PATH} steps: - checkout - run: name: Print Go version (go version) command: | go version + pwd - run: name: Run tests command: | From f9ca9bae3ee1305d466649ffa9e4aa2e0e1f0b8e Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:00:18 +0200 Subject: [PATCH 26/53] Switching to CircleCI --- .circleci/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 74a49599..684c534e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,9 +10,10 @@ jobs: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results + PROJECT_NAME: gods GOPATH: ${HOME}/go - REPO_PATH: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} - working_directory: ${REPO_PATH} + PROJECT_PATH: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${PROJECT_NAME} + working_directory: ${PROJECT_PATH} steps: - checkout - run: @@ -50,7 +51,7 @@ jobs: name: Calculate cyclomatic complexity (gocyclo) command: | go install github.com/fzipp/gocyclo/cmd/gocyclo@latest - gocyclo -avg -over 15 ../${CIRCLE_PROJECT_REPONAME} + gocyclo -avg -over 15 ../${PROJECT_NAME} - run: name: Check for unchecked errors (errcheck) command: | From 2d480b396591e7bd9956fb982f17db03fd490b1a Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:02:28 +0200 Subject: [PATCH 27/53] Switching to CircleCI --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 684c534e..1f24152a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,11 @@ jobs: PROJECT_PATH: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${PROJECT_NAME} working_directory: ${PROJECT_PATH} steps: + - run: + name: Create directories + command: | + mkdir -p PROJECT_PATH + mkdir -p $TEST_RESULTS - checkout - run: name: Print Go version (go version) @@ -24,13 +29,11 @@ jobs: - run: name: Run tests command: | - mkdir -p $TEST_RESULTS go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: name: Calculate test coverage command: | - mkdir -p $TEST_RESULTS go test -coverprofile=c.out ./... > /dev/null go tool cover -html=c.out -o coverage.html mv coverage.html $TEST_RESULTS From ed2e66b1dc4490387918ee05d20f8c200cf9444e Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:05:34 +0200 Subject: [PATCH 28/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f24152a..49f25c39 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: - run: name: Create directories command: | - mkdir -p PROJECT_PATH + mkdir -p $PROJECT_PATH mkdir -p $TEST_RESULTS - checkout - run: From 3e18023259d4c2add8ccd170f1ec73d1ccff0cc0 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:10:33 +0200 Subject: [PATCH 29/53] Switching to CircleCI --- .circleci/config.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 49f25c39..eeff2e47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,16 +10,10 @@ jobs: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results - PROJECT_NAME: gods GOPATH: ${HOME}/go - PROJECT_PATH: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${PROJECT_NAME} - working_directory: ${PROJECT_PATH} + PROJECT_PATH: ${GOPATH}/src/github.com/emirpasic/gods + working_directory: ~/src/github.com/emirpasic/gods steps: - - run: - name: Create directories - command: | - mkdir -p $PROJECT_PATH - mkdir -p $TEST_RESULTS - checkout - run: name: Print Go version (go version) @@ -29,6 +23,7 @@ jobs: - run: name: Run tests command: | + mkdir -p $TEST_RESULTS go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: @@ -54,7 +49,7 @@ jobs: name: Calculate cyclomatic complexity (gocyclo) command: | go install github.com/fzipp/gocyclo/cmd/gocyclo@latest - gocyclo -avg -over 15 ../${PROJECT_NAME} + gocyclo -avg -over 15 ../gods - run: name: Check for unchecked errors (errcheck) command: | From 27e9ad878708a21be032d9a6f742d91e7fadbf3d Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:11:35 +0200 Subject: [PATCH 30/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eeff2e47..3e152676 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results - GOPATH: ${HOME}/go + GOPATH: ~/go PROJECT_PATH: ${GOPATH}/src/github.com/emirpasic/gods working_directory: ~/src/github.com/emirpasic/gods steps: From eee4c73dbdbeb5ff36f3762d9b22d0e5124314ce Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:13:20 +0200 Subject: [PATCH 31/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3e152676..3f2d5288 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results - GOPATH: ~/go + GOPATH: $HOME/go PROJECT_PATH: ${GOPATH}/src/github.com/emirpasic/gods working_directory: ~/src/github.com/emirpasic/gods steps: From f8d4389b461f9a325615ca0474b2cbefebbdcefa Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:14:08 +0200 Subject: [PATCH 32/53] Switching to CircleCI --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f2d5288..0cc769ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,7 @@ jobs: environment: TEST_RESULTS: /tmp/test-results GOPATH: $HOME/go - PROJECT_PATH: ${GOPATH}/src/github.com/emirpasic/gods - working_directory: ~/src/github.com/emirpasic/gods + working_directory: ~/go/src/github.com/emirpasic/gods steps: - checkout - run: From 7478be5d1755b57437af0299220e519f7c8f375d Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:15:05 +0200 Subject: [PATCH 33/53] Switching to CircleCI --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cc769ae..6744de94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,12 +13,13 @@ jobs: GOPATH: $HOME/go working_directory: ~/go/src/github.com/emirpasic/gods steps: - - checkout - run: name: Print Go version (go version) command: | go version pwd + echo $HOME + - checkout - run: name: Run tests command: | From 8c1095677a26066f366946b2ffdce543317358f8 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:16:47 +0200 Subject: [PATCH 34/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6744de94..b325d7df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,9 +16,9 @@ jobs: - run: name: Print Go version (go version) command: | - go version pwd echo $HOME + go version - checkout - run: name: Run tests From c91beb083159e7cd81f4187f14b210c8969e204d Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:18:23 +0200 Subject: [PATCH 35/53] Switching to CircleCI --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b325d7df..f446e9b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,8 @@ jobs: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results - GOPATH: $HOME/go - working_directory: ~/go/src/github.com/emirpasic/gods + GOPATH: /home/circleci/go + working_directory: /home/circleci/go/src/github.com/emirpasic/gods steps: - run: name: Print Go version (go version) From 68d62ab739d492d6b2aefbce2c3e782e98654784 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:31:07 +0200 Subject: [PATCH 36/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f446e9b9..dca5efd3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,7 @@ jobs: - run: name: Lint (golint) command: | - go install golang.org/x/lint/golint@latest + go install golang.org/x/lint/golint@latest || go get -u golang.org/x/lint/golint golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) From 23ff506555b6c89d51abfe8cccc9181b02192c76 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:36:40 +0200 Subject: [PATCH 37/53] Switching to CircleCI --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dca5efd3..89b0f950 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,7 @@ jobs: environment: TEST_RESULTS: /tmp/test-results GOPATH: /home/circleci/go + GO111MODULE: on working_directory: /home/circleci/go/src/github.com/emirpasic/gods steps: - run: @@ -35,7 +36,7 @@ jobs: - run: name: Lint (golint) command: | - go install golang.org/x/lint/golint@latest || go get -u golang.org/x/lint/golint + go install golang.org/x/lint/golint@latest golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) @@ -67,4 +68,4 @@ workflows: - test: matrix: parameters: - version: ["1.18", "1.17", "1.10"] \ No newline at end of file + version: ["1.18", "1.17", "1.10", "1.11"] \ No newline at end of file From dabe253199db94005d6f04ccd87ed0c7e0d3c638 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:40:14 +0200 Subject: [PATCH 38/53] Switching to CircleCI --- .circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 89b0f950..de5e28b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,14 +11,12 @@ jobs: environment: TEST_RESULTS: /tmp/test-results GOPATH: /home/circleci/go - GO111MODULE: on + GO111MODULE: "on" working_directory: /home/circleci/go/src/github.com/emirpasic/gods steps: - run: name: Print Go version (go version) command: | - pwd - echo $HOME go version - checkout - run: From 6b76fcbc81d7621790cdc6560f7aac5e58669271 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:45:43 +0200 Subject: [PATCH 39/53] Switching to CircleCI --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index de5e28b9..435e49dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,11 +23,13 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS + go install gotest.tools/gotestsum@latest go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: name: Calculate test coverage command: | + mkdir -p $TEST_RESULTS go test -coverprofile=c.out ./... > /dev/null go tool cover -html=c.out -o coverage.html mv coverage.html $TEST_RESULTS From 371a50d22c629c4041fe20a53c82660bd1f787ab Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:48:06 +0200 Subject: [PATCH 40/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 435e49dd..6a5cc8de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS - go install gotest.tools/gotestsum@latest + go install gotest.tools/gotestsum@latest || gotest.tools/gotestsum go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: From 31fccfff72017a2d10b929900309fbbbad0268ac Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:51:53 +0200 Subject: [PATCH 41/53] Switching to CircleCI --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6a5cc8de..244e84bf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS - go install gotest.tools/gotestsum@latest || gotest.tools/gotestsum + go install gotest.tools/gotestsum@latest || go get gotest.tools/gotestsum go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: @@ -36,7 +36,7 @@ jobs: - run: name: Lint (golint) command: | - go install golang.org/x/lint/golint@latest + go install golang.org/x/lint/golint@latest || go get golang.org/x/lint/golint golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) @@ -49,12 +49,12 @@ jobs: - run: name: Calculate cyclomatic complexity (gocyclo) command: | - go install github.com/fzipp/gocyclo/cmd/gocyclo@latest + go install github.com/fzipp/gocyclo/cmd/gocyclo@latest || go get github.com/fzipp/gocyclo gocyclo -avg -over 15 ../gods - run: name: Check for unchecked errors (errcheck) command: | - go install github.com/kisielk/errcheck@latest + go install github.com/kisielk/errcheck@latest || go get github.com/kisielk/errcheck errcheck ./... - store_artifacts: path: /tmp/test-results From 10343eeeaf7c35437ed50d64020575531e2a8464 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:54:12 +0200 Subject: [PATCH 42/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 244e84bf..6776746f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS - go install gotest.tools/gotestsum@latest || go get gotest.tools/gotestsum + go install gotest.tools/gotestsum@latest || go get github.com/gotestyourself/gotestsum/gotestsum go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: From f871cf9f85e3a8b2986cc084f691b02424ecefd9 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:55:23 +0200 Subject: [PATCH 43/53] Switching to CircleCI --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6776746f..61df7c9f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,6 @@ jobs: environment: TEST_RESULTS: /tmp/test-results GOPATH: /home/circleci/go - GO111MODULE: "on" working_directory: /home/circleci/go/src/github.com/emirpasic/gods steps: - run: From 915a2bc13e400744477cfcf7a8d510ca919115fe Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:56:08 +0200 Subject: [PATCH 44/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 61df7c9f..a25ceccf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,7 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS - go install gotest.tools/gotestsum@latest || go get github.com/gotestyourself/gotestsum/gotestsum + go install gotest.tools/gotestsum@latest || go get gotest.tools/gotestsum go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: From f602a98ae47ead22be694fd7e4b9bed6e2faa381 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:58:34 +0200 Subject: [PATCH 45/53] Switching to CircleCI --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a25ceccf..6b50a573 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,8 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS - go install gotest.tools/gotestsum@latest || go get gotest.tools/gotestsum +# go install gotest.tools/gotestsum@latest || go get gotest.tools/gotestsum + go get gotest.tools/gotestsum go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: From 3a92202c302c60018367ca45e069b27468e9ca38 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 20:59:06 +0200 Subject: [PATCH 46/53] Switching to CircleCI --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b50a573..c54e36f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,7 +22,6 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS -# go install gotest.tools/gotestsum@latest || go get gotest.tools/gotestsum go get gotest.tools/gotestsum go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml From 46fd454eed882be94b2c58c9ff704f4bb71cf7d2 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:00:06 +0200 Subject: [PATCH 47/53] Switching to CircleCI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index c54e36f5..4e4b45c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,7 @@ jobs: environment: TEST_RESULTS: /tmp/test-results GOPATH: /home/circleci/go + GO111MODULE: "on" working_directory: /home/circleci/go/src/github.com/emirpasic/gods steps: - run: From 2d64eb43be9b981098d779a3531572a1883c0227 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:01:43 +0200 Subject: [PATCH 48/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e4b45c4..2283d899 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -68,4 +68,4 @@ workflows: - test: matrix: parameters: - version: ["1.18", "1.17", "1.10", "1.11"] \ No newline at end of file + version: ["1.18", "1.17", "1.12"] \ No newline at end of file From fc28a203fb77419c98db0f2d5bfd39363eefc2e8 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:03:49 +0200 Subject: [PATCH 49/53] Switching to CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2283d899..cea5d35a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,7 +49,7 @@ jobs: - run: name: Calculate cyclomatic complexity (gocyclo) command: | - go install github.com/fzipp/gocyclo/cmd/gocyclo@latest || go get github.com/fzipp/gocyclo + go install github.com/fzipp/gocyclo/cmd/gocyclo@latest || go get github.com/fzipp/gocyclo/cmd/gocyclo gocyclo -avg -over 15 ../gods - run: name: Check for unchecked errors (errcheck) From 76d2e78a21cc8099908a1b1dc4cf6a28ff4091ed Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:05:33 +0200 Subject: [PATCH 50/53] Switching to CircleCI --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cea5d35a..2f0c3b33 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: - run: name: Lint (golint) command: | - go install golang.org/x/lint/golint@latest || go get golang.org/x/lint/golint + go get golang.org/x/lint/golint golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) @@ -49,12 +49,12 @@ jobs: - run: name: Calculate cyclomatic complexity (gocyclo) command: | - go install github.com/fzipp/gocyclo/cmd/gocyclo@latest || go get github.com/fzipp/gocyclo/cmd/gocyclo + go get github.com/fzipp/gocyclo/cmd/gocyclo gocyclo -avg -over 15 ../gods - run: name: Check for unchecked errors (errcheck) command: | - go install github.com/kisielk/errcheck@latest || go get github.com/kisielk/errcheck + go get github.com/kisielk/errcheck errcheck ./... - store_artifacts: path: /tmp/test-results From c76ef961a2aaff06fde3131791195bb5f450ad55 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:09:11 +0200 Subject: [PATCH 51/53] Switching to CircleCI --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f0c3b33..c78b35de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,6 +12,7 @@ jobs: TEST_RESULTS: /tmp/test-results GOPATH: /home/circleci/go GO111MODULE: "on" + PATH: $PATH:/home/circleci/go/bin working_directory: /home/circleci/go/src/github.com/emirpasic/gods steps: - run: From aafef2ee7bcb95c190223d7b2cbdad35309a3b54 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:19:14 +0200 Subject: [PATCH 52/53] Switching to CircleCI --- .circleci/config.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c78b35de..5ceddd8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,10 +10,7 @@ jobs: - image: cimg/go:<> environment: TEST_RESULTS: /tmp/test-results - GOPATH: /home/circleci/go - GO111MODULE: "on" - PATH: $PATH:/home/circleci/go/bin - working_directory: /home/circleci/go/src/github.com/emirpasic/gods + working_directory: ~/gods steps: - run: name: Print Go version (go version) @@ -24,7 +21,7 @@ jobs: name: Run tests command: | mkdir -p $TEST_RESULTS - go get gotest.tools/gotestsum + go install gotest.tools/gotestsum@latest go test -v ./... | go tool test2json > $TEST_RESULTS/test2json-output.json gotestsum --junitfile $TEST_RESULTS/gotestsum-report.xml - run: @@ -37,7 +34,7 @@ jobs: - run: name: Lint (golint) command: | - go get golang.org/x/lint/golint + go install golang.org/x/lint/golint@latest golint -set_exit_status ./... - run: name: Enforce formatted code (go fmt) @@ -50,12 +47,12 @@ jobs: - run: name: Calculate cyclomatic complexity (gocyclo) command: | - go get github.com/fzipp/gocyclo/cmd/gocyclo + go install github.com/fzipp/gocyclo/cmd/gocyclo@latest gocyclo -avg -over 15 ../gods - run: name: Check for unchecked errors (errcheck) command: | - go get github.com/kisielk/errcheck + go install github.com/kisielk/errcheck@latest errcheck ./... - store_artifacts: path: /tmp/test-results @@ -69,4 +66,4 @@ workflows: - test: matrix: parameters: - version: ["1.18", "1.17", "1.12"] \ No newline at end of file + version: ["1.18", "1.17", "1.10", "1.12"] \ No newline at end of file From 340b511e02df272d17c3a62a48f5dabe95b43dd5 Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Wed, 6 Apr 2022 21:21:24 +0200 Subject: [PATCH 53/53] Switching to CircleCI --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ceddd8b..d4b80047 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,4 +66,5 @@ workflows: - test: matrix: parameters: - version: ["1.18", "1.17", "1.10", "1.12"] \ No newline at end of file + # To test with and without generics (versions prior to 1.18) + version: ["1.18", "1.17"] \ No newline at end of file