diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bd0771..8859a4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,11 @@ jobs: env: SRC_DIR: src/github.com/${{ github.repository }} + GO111MODULE: auto strategy: matrix: - go: [ '1.14.x', '1.15.x' ] + go: [ '1.15.x', '1.16.x' ] steps: - name: Set up Go @@ -75,17 +76,38 @@ jobs: needs: Go + env: + SRC_DIR: src/github.com/${{ github.repository }} + GO111MODULE: auto + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.16.x' + id: go + + - name: Setup PATH + run: | + echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV" + echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV" + echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" + - name: Checkout uses: actions/checkout@v2 + with: + path: ${{env.SRC_DIR}} - name: Install Aligo + working-directory: ${{env.SRC_DIR}} run: | wget https://apps.kaos.st/aligo/latest/linux/x86_64/aligo chmod +x aligo - name: Print Aligo version info + working-directory: ${{env.SRC_DIR}} run: ./aligo --version - name: Check Go structs alignment info + working-directory: ${{env.SRC_DIR}} run: ./aligo check ./... diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql.yml similarity index 85% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/codeql.yml index da7adf3..ce19a79 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql.yml @@ -19,9 +19,6 @@ jobs: with: fetch-depth: 2 - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: diff --git a/.github/workflows/godoc.yml b/.github/workflows/godoc.yml new file mode 100644 index 0000000..8bf64c0 --- /dev/null +++ b/.github/workflows/godoc.yml @@ -0,0 +1,13 @@ +name: GoDoc + +on: + create + +jobs: + GoDoc: + name: Generate docs + runs-on: ubuntu-latest + + steps: + - name: Trigger GoSumDB and PkgGoDev + uses: essentialkaos/pkgre-godoc-action@v1 diff --git a/Makefile b/Makefile index daf5615..cd72b05 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ################################################################################ -# This Makefile generated by GoMakeGen 1.1.2 using next command: +# This Makefile generated by GoMakeGen 1.3.2 using next command: # gomakegen . # # More info: https://kaos.sh/gomakegen @@ -8,7 +8,7 @@ ################################################################################ .DEFAULT_GOAL := help -.PHONY = fmt git-config deps-test test help +.PHONY = fmt vet git-config deps-test test help ################################################################################ @@ -16,7 +16,7 @@ git-config: ## Configure git redirects for stable import path services git config --global http.https://pkg.re.followRedirects true deps-test: git-config ## Download dependencies for tests - go get -d -v pkg.re/check.v1 + go get -d -v pkg.re/essentialkaos/check.v1 test: ## Run tests go test -covermode=count . @@ -24,11 +24,14 @@ test: ## Run tests fmt: ## Format source code with gofmt find . -name "*.go" -exec gofmt -s -w {} \; +vet: ## Runs go vet over sources + go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./... + help: ## Show this info @echo -e '\n\033[1mSupported targets:\033[0m\n' @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \ | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}' @echo -e '' - @echo -e '\033[90mGenerated by GoMakeGen 1.1.2\033[0m\n' + @echo -e '\033[90mGenerated by GoMakeGen 1.3.2\033[0m\n' ################################################################################ diff --git a/README.md b/README.md index a23da4a..b8736b1 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@

- PkgGoDev - - GitHub Actions Status - - Coverage Status - codebeat badge + PkgGoDev + GoReportCard + GitHub Actions CI Status + GitHub Actions CodeQL Status + Coverage Status + Codebeat badge

@@ -18,24 +18,24 @@ ### Installation -Make sure you have a working Go 1.14+ workspace (_[instructions](https://golang.org/doc/install)_), then: +Make sure you have a working Go 1.15+ workspace (_[instructions](https://golang.org/doc/install)_), then: ``` -go get pkg.re/essentialkaos/go-jar.v1 +go get -d pkg.re/essentialkaos/go-jar.v1 ``` For update to the latest stable release, do: ``` -go get -u pkg.re/essentialkaos/go-jar.v1 +go get -d -u pkg.re/essentialkaos/go-jar.v1 ``` ### Build Status | Branch | Status | -|--------|--------| -| `master` | ![CI](https://github.com/essentialkaos/go-jar/workflows/CI/badge.svg?branch=master) | -| `develop` | ![CI](https://github.com/essentialkaos/go-jar/workflows/CI/badge.svg?branch=develop) | +|--------|----------| +| `master` | [![CI](https://kaos.sh/w/go-jar/ci.svg?branch=master)](https://kaos.sh/w/go-jar/ci?query=branch:master) | +| `develop` | [![CI](https://kaos.sh/w/go-jar/ci.svg?branch=develop)](https://kaos.sh/w/go-jar/ci?query=branch:develop) | ### License diff --git a/examples_test.go b/examples_test.go index a7c25dc..a20d014 100644 --- a/examples_test.go +++ b/examples_test.go @@ -2,7 +2,7 @@ package jar // ////////////////////////////////////////////////////////////////////////////////// // // // -// Copyright (c) 2020 ESSENTIAL KAOS // +// Copyright (c) 2021 ESSENTIAL KAOS // // Apache License, Version 2.0 // // // // ////////////////////////////////////////////////////////////////////////////////// // diff --git a/jar.go b/jar.go index 102c99c..033301a 100644 --- a/jar.go +++ b/jar.go @@ -2,7 +2,7 @@ package jar // ////////////////////////////////////////////////////////////////////////////////// // // // -// Copyright (c) 2020 ESSENTIAL KAOS // +// Copyright (c) 2021 ESSENTIAL KAOS // // Apache License, Version 2.0 // // // // ////////////////////////////////////////////////////////////////////////////////// // diff --git a/jar_test.go b/jar_test.go index 802125c..db63581 100644 --- a/jar_test.go +++ b/jar_test.go @@ -2,7 +2,7 @@ package jar // ////////////////////////////////////////////////////////////////////////////////// // // // -// Copyright (c) 2020 ESSENTIAL KAOS // +// Copyright (c) 2021 ESSENTIAL KAOS // // Apache License, Version 2.0 // // // // ////////////////////////////////////////////////////////////////////////////////// // @@ -10,7 +10,7 @@ package jar import ( "testing" - . "pkg.re/check.v1" + . "pkg.re/essentialkaos/check.v1" ) // ////////////////////////////////////////////////////////////////////////////////// //