From 8347f4aa0fab528431b6dabda3332673a7f7f03a Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 13:02:45 -0700 Subject: [PATCH 1/7] added workflows --- .github/workflows/go-test.yml | 27 +++++++++++++++++ .github/workflows/golangcli-lint.yml | 45 ++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/go-test.yml create mode 100644 .github/workflows/golangcli-lint.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..aa7ba2a --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,27 @@ +name: go-test +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: '1.17.5' + + - name: Test With Coverage + run: go test -gcflags=-l -v --race --cover -coverprofile=coverage.txt -covermode=atomic ./... + + - name: Run Vet & Lint + run: go vet ./... \ No newline at end of file diff --git a/.github/workflows/golangcli-lint.yml b/.github/workflows/golangcli-lint.yml new file mode 100644 index 0000000..ff13940 --- /dev/null +++ b/.github/workflows/golangcli-lint.yml @@ -0,0 +1,45 @@ +name: golangci-lint +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2 + with: + go-version: 1.17.x + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version + version: v1.43.0 + + # Optional: working directory, useful for monorepos + # working-directory: somedir + + # Optional: golangci-lint command line arguments. + # args: --issues-exit-code=0 + + # Optional: show only new issues if it's a pull request. The default value is `false`. + # only-new-issues: true + + Optional: if set to true then the action will use pre-installed Go. + skip-go-installation: true + + # Optional: if set to true then the action don't cache or restore ~/go/pkg. + # skip-pkg-cache: true + + # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. + # skip-build-cache: true \ No newline at end of file From fe1c529a51fec902741964f14d0f1f5ef7b35336 Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 13:07:37 -0700 Subject: [PATCH 2/7] update the go test version --- .github/workflows/go-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index aa7ba2a..f68305f 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '1.17.5' + go-version: '1.19.4' - name: Test With Coverage run: go test -gcflags=-l -v --race --cover -coverprofile=coverage.txt -covermode=atomic ./... From 750fb769c8349beefa0d368afc5e5965b5ac6c42 Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 13:08:51 -0700 Subject: [PATCH 3/7] update the go test version --- .github/workflows/golangcli-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangcli-lint.yml b/.github/workflows/golangcli-lint.yml index ff13940..dfe2f9c 100644 --- a/.github/workflows/golangcli-lint.yml +++ b/.github/workflows/golangcli-lint.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: 1.17.x + go-version: 1.19.x - uses: actions/checkout@v2 - name: golangci-lint uses: golangci/golangci-lint-action@v2 From c3f893b7a8af8b73ec1b749d35012e40eafbaef4 Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 13:10:58 -0700 Subject: [PATCH 4/7] updated lintter version --- .github/workflows/golangcli-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangcli-lint.yml b/.github/workflows/golangcli-lint.yml index dfe2f9c..4add6de 100644 --- a/.github/workflows/golangcli-lint.yml +++ b/.github/workflows/golangcli-lint.yml @@ -24,7 +24,7 @@ jobs: uses: golangci/golangci-lint-action@v2 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v1.43.0 + version: v1.53.3 # Optional: working directory, useful for monorepos # working-directory: somedir From bb1fee5f9fcbb361013da42041d71a7640502a3d Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 17:26:00 -0700 Subject: [PATCH 5/7] added badges --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7108a7d..34bed5f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![golangci-lint](https://github.com/g8rswimmer/go-twitter/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/g8rswimmer/go-twitter/actions/workflows/golangci-lint.yml) +[![go-test](https://github.com/g8rswimmer/go-twitter/actions/workflows/go-test.yml/badge.svg)](https://github.com/g8rswimmer/go-twitter/actions/workflows/go-test.yml) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) # Go Tree Map This Map is implemented using a [red-black tree](https://en.wikipedia.org/wiki/Red%E2%80%93black_tree) which allows for the keys to be ordered. When interating through the the maps pairs, key and value, those pairs will be return in descending order. This can be useful when iteration through the map needs to be deterministic. From 7dd8d3c063275362aab58d9e2d66ee431dc8e012 Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 17:26:59 -0700 Subject: [PATCH 6/7] updated badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 34bed5f..b781bbf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![golangci-lint](https://github.com/g8rswimmer/go-twitter/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/g8rswimmer/go-twitter/actions/workflows/golangci-lint.yml) -[![go-test](https://github.com/g8rswimmer/go-twitter/actions/workflows/go-test.yml/badge.svg)](https://github.com/g8rswimmer/go-twitter/actions/workflows/go-test.yml) +[![golangci-lint](https://github.com/g8rswimmer/go-tree-map/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/g8rswimmer/go-tree-map/actions/workflows/golangci-lint.yml) +[![go-test](https://github.com/g8rswimmer/go-tree-map/actions/workflows/go-test.yml/badge.svg)](https://github.com/g8rswimmer/go-tree-map/actions/workflows/go-test.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) # Go Tree Map This Map is implemented using a [red-black tree](https://en.wikipedia.org/wiki/Red%E2%80%93black_tree) which allows for the keys to be ordered. When interating through the the maps pairs, key and value, those pairs will be return in descending order. This can be useful when iteration through the map needs to be deterministic. From eeccd1925ee2a6becab27e16d92da8823a75ed29 Mon Sep 17 00:00:00 2001 From: Sean Justice Date: Sun, 6 Aug 2023 17:28:02 -0700 Subject: [PATCH 7/7] updated badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b781bbf..7ef93af 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![golangci-lint](https://github.com/g8rswimmer/go-tree-map/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/g8rswimmer/go-tree-map/actions/workflows/golangci-lint.yml) +[![golangci-lint](https://github.com/g8rswimmer/go-tree-map/actions/workflows/golangcli-lint.yml/badge.svg)](https://github.com/g8rswimmer/go-tree-map/actions/workflows/golangcli-lint.yml) [![go-test](https://github.com/g8rswimmer/go-tree-map/actions/workflows/go-test.yml/badge.svg)](https://github.com/g8rswimmer/go-tree-map/actions/workflows/go-test.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) # Go Tree Map