From e3ab5f51725949d0d96ac6e1e7da9128ff87fb8e Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:24:49 +0700 Subject: [PATCH 01/24] github action build --- .github/workflows/build_test.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/build_test.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 0000000000..bd383353e0 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,21 @@ +name: Buid and test + +on: + pull_request: + push: + paths-ignore: + - '**.md' + branches: + - master + +jobs: + build: + - uses: actions/checkout@v3 + - name: Setup golang + uses: actions/setup-go@v4 + with: + go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. + run: go version + - name: Setup golang + run: make tomo + From de0f6132064240c5a8ebd70af2c66841550d4a15 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:27:46 +0700 Subject: [PATCH 02/24] add steps --- .github/workflows/build_test.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index bd383353e0..fac6303eca 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -1,4 +1,4 @@ -name: Buid and test +name: Build and test on: pull_request: @@ -10,12 +10,14 @@ on: jobs: build: - - uses: actions/checkout@v3 - - name: Setup golang - uses: actions/setup-go@v4 - with: - go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - run: go version - - name: Setup golang - run: make tomo - + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup golang + uses: actions/setup-go@v4 + with: + go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. + run: go version + - name: Setup golang + run: make tomo + From 4ff372ab33c27213e7af71ee3fb4a4df588aba3a Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:29:28 +0700 Subject: [PATCH 03/24] remove use in setup golang --- .github/workflows/build_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index fac6303eca..66108b4843 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,7 +17,6 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - run: go version - name: Setup golang run: make tomo From c9383a36816dd11aa752fe368d547f6df92a1b76 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:33:51 +0700 Subject: [PATCH 04/24] setup env --- .github/workflows/build_test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 66108b4843..fec415d16d 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,12 +11,19 @@ on: jobs: build: runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }} + GOBIN: ${{ github.workspace }}/bin steps: - uses: actions/checkout@v3 - name: Setup golang uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - - name: Setup golang - run: make tomo + - name: Lint code + run: go run build/ci.go lint + - name: Build tomo + run: go run build/ci.go install + - name: Test tomo + run: go run build/ci.go test -coverage From 5d9d9c58d4f503b9f7144b584d2771fff9163ccb Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:42:59 +0700 Subject: [PATCH 05/24] fix --- .github/workflows/build_test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index fec415d16d..3962882843 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -11,17 +11,19 @@ on: jobs: build: runs-on: ubuntu-latest - env: - GOPATH: ${{ github.workspace }} - GOBIN: ${{ github.workspace }}/bin steps: - uses: actions/checkout@v3 - name: Setup golang uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. + - name: setup env + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash - name: Lint code - run: go run build/ci.go lint + run: export GOROOT=$HOME/usr/local/go | export GOPATH=$HOME/go | go run build/ci.go lint - name: Build tomo run: go run build/ci.go install - name: Test tomo From 979ab1a74a1fe18d9cb28dda0e1510c70c2575c8 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:45:26 +0700 Subject: [PATCH 06/24] fix gopath --- .github/workflows/build_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 3962882843..8d1ca72a9c 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -19,8 +19,7 @@ jobs: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - name: setup env run: | - echo "::set-env name=GOPATH::$(go env GOPATH)" - echo "::add-path::$(go env GOPATH)/bin" + export GOPATH=$HOME/go shell: bash - name: Lint code run: export GOROOT=$HOME/usr/local/go | export GOPATH=$HOME/go | go run build/ci.go lint From 948d3264178766014a7fd7d0bfdd4f9133db0007 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:51:34 +0700 Subject: [PATCH 07/24] setup env in steps --- .github/workflows/build_test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 8d1ca72a9c..2b82cdec39 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,12 +17,10 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - - name: setup env - run: | - export GOPATH=$HOME/go - shell: bash - name: Lint code - run: export GOROOT=$HOME/usr/local/go | export GOPATH=$HOME/go | go run build/ci.go lint + run: go run build/ci.go lint + env: + GOPATH: /home/runner/work/woodpecker/go - name: Build tomo run: go run build/ci.go install - name: Test tomo From 6f43e5c05ae13994a10f78689339da510400abf1 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 15:56:25 +0700 Subject: [PATCH 08/24] add gobin --- .github/workflows/build_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 2b82cdec39..a488284233 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -21,6 +21,7 @@ jobs: run: go run build/ci.go lint env: GOPATH: /home/runner/work/woodpecker/go + GOBIN: /home/runner/work/woodpecker/go - name: Build tomo run: go run build/ci.go install - name: Test tomo From f8ae4ac6459b5a169c5e79895e7d812bb4c32650 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:01:09 +0700 Subject: [PATCH 09/24] use golint action --- .github/workflows/build_test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index a488284233..d251e1c101 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -18,10 +18,9 @@ jobs: with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - name: Lint code - run: go run build/ci.go lint - env: - GOPATH: /home/runner/work/woodpecker/go - GOBIN: /home/runner/work/woodpecker/go + uses: golangci/golangci-lint-action@v3 + with: + version: v1.53 - name: Build tomo run: go run build/ci.go install - name: Test tomo From f90f8796e3e68637e6745111a28383599d012293 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:11:43 +0700 Subject: [PATCH 10/24] get golint --- .github/workflows/build_test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index d251e1c101..d5de8b0905 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -18,9 +18,11 @@ jobs: with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - name: Lint code - uses: golangci/golangci-lint-action@v3 - with: - version: v1.53 + run: + go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 + | go run build/ci.go lint + env: + GOPATH: /home/runner/work/woodpecker/go - name: Build tomo run: go run build/ci.go install - name: Test tomo From 6306e93428e05fbaa125266a9a7b13fda23a5f5d Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:12:50 +0700 Subject: [PATCH 11/24] use golint --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index d5de8b0905..a46f0926cb 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -20,7 +20,7 @@ jobs: - name: Lint code run: go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 - | go run build/ci.go lint + | golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 env: GOPATH: /home/runner/work/woodpecker/go - name: Build tomo From b3ee3fe7580a59305a62b94ac6a5203119cab5fa Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:14:43 +0700 Subject: [PATCH 12/24] install dependency --- .github/workflows/build_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index a46f0926cb..65bb9c455e 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,10 +17,13 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - - name: Lint code + - name: Install golangci-lint run: go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 - | golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 + env: + GOPATH: /home/runner/work/woodpecker/go + - name: Lint code + run: golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 env: GOPATH: /home/runner/work/woodpecker/go - name: Build tomo From 5073c9e6eedb8390d22d2dbcd19d9568ed7df2d9 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:22:49 +0700 Subject: [PATCH 13/24] add timeout --- .github/workflows/build_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 65bb9c455e..9c99af0cad 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,6 +17,11 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. + - name: Use golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.53 + timeout: 30m - name: Install golangci-lint run: go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 From 79f7309aa1fbbe0616bb45adeccd77257d990dd4 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:28:12 +0700 Subject: [PATCH 14/24] remove package --- .github/workflows/build_test.yml | 3 ++- build/ci.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 9c99af0cad..4d9e2ba1e4 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -23,7 +23,8 @@ jobs: version: v1.53 timeout: 30m - name: Install golangci-lint - run: + run: | + go version go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 env: GOPATH: /home/runner/work/woodpecker/go diff --git a/build/ci.go b/build/ci.go index ea44817049..d20d94015e 100644 --- a/build/ci.go +++ b/build/ci.go @@ -271,7 +271,7 @@ func doLint(cmdline []string) { // Run slow linters one by one for _, linter := range []string{"unconvert", "gosimple"} { configs = []string{"--vendor", "--deadline=10m", "--disable-all", "--enable=" + linter} - build.MustRunCommand(filepath.Join(GOBIN, "golangci-lint"), append(configs, packages...)...) + build.MustRunCommand(filepath.Join(GOBIN, "golangci-lint"), append(configs)...) } } From b7bdca8f0b0dbad43574d39c018c803ec607e64d Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:29:28 +0700 Subject: [PATCH 15/24] remove golint action --- .github/workflows/build_test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 4d9e2ba1e4..9b071f29f0 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -17,11 +17,6 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - - name: Use golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - version: v1.53 - timeout: 30m - name: Install golangci-lint run: | go version From bcca7a94fbb2a6496a84315c0b1b985931095761 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:30:24 +0700 Subject: [PATCH 16/24] fix install dep --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 9b071f29f0..eeaf685887 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -20,7 +20,7 @@ jobs: - name: Install golangci-lint run: | go version - go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 + go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 env: GOPATH: /home/runner/work/woodpecker/go - name: Lint code From ab67e2c1381a21b5fafd81148d8cef5ce0fb8c85 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:34:22 +0700 Subject: [PATCH 17/24] fix path --- .github/workflows/build_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index eeaf685887..28002c80de 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -24,7 +24,7 @@ jobs: env: GOPATH: /home/runner/work/woodpecker/go - name: Lint code - run: golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 + run: ${GOPATH}/bin/golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 env: GOPATH: /home/runner/work/woodpecker/go - name: Build tomo From 63c03bf0a7882b6244343f772170cbd4c675bf26 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:39:41 +0700 Subject: [PATCH 18/24] use lint action --- .github/workflows/build_test.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 28002c80de..b99cc2c3a3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -9,7 +9,7 @@ on: - master jobs: - build: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -17,6 +17,13 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + # Require: The version of golangci-lint to use. + # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. + # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. + version: v1.53 - name: Install golangci-lint run: | go version @@ -27,8 +34,18 @@ jobs: run: ${GOPATH}/bin/golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 env: GOPATH: /home/runner/work/woodpecker/go + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup golang + uses: actions/setup-go@v4 + with: + go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - name: Build tomo run: go run build/ci.go install - name: Test tomo run: go run build/ci.go test -coverage + From f6c4075d7ca51a7536cf8237ece1d74d5bfea6a2 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:41:16 +0700 Subject: [PATCH 19/24] add gopath --- .github/workflows/build_test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index b99cc2c3a3..4b247b6c73 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -45,6 +45,8 @@ jobs: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - name: Build tomo run: go run build/ci.go install + env: + GOPATH: /home/runner/go - name: Test tomo run: go run build/ci.go test -coverage From 09090c133b3c88c34b3faf9bff178a2986eca776 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:48:09 +0700 Subject: [PATCH 20/24] add gopath for test --- .github/workflows/build_test.yml | 8 ++------ .golangci.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 4b247b6c73..3ffaed775b 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -24,12 +24,6 @@ jobs: # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. version: v1.53 - - name: Install golangci-lint - run: | - go version - go get -u github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0 - env: - GOPATH: /home/runner/work/woodpecker/go - name: Lint code run: ${GOPATH}/bin/golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 env: @@ -49,5 +43,7 @@ jobs: GOPATH: /home/runner/go - name: Test tomo run: go run build/ci.go test -coverage + env: + GOPATH: /home/runner/go diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000000..2189ebc33c --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,8 @@ +run: + timeout: 5m +linters: + enable: + - vet + - gofmt + - misspell + - goconst From 6bef4c54e599cfda990ecbad4d112c2b1c5cf9e4 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:48:53 +0700 Subject: [PATCH 21/24] split build and test --- .github/workflows/build_test.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 3ffaed775b..0ff126a539 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -37,13 +37,21 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. - - name: Build tomo + - name: Build run: go run build/ci.go install env: GOPATH: /home/runner/go - - name: Test tomo + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup golang + uses: actions/setup-go@v4 + with: + go-version: '1.20.0-rc.1' # The Go version to download (if necessary) and use. + - name: Test run: go run build/ci.go test -coverage env: GOPATH: /home/runner/go - From 2a35a79a28fb52b0452c607dcd3347f88e25fb81 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:53:25 +0700 Subject: [PATCH 22/24] rm lint action --- .github/workflows/{build_test.yml => ci.yml} | 7 ------- 1 file changed, 7 deletions(-) rename .github/workflows/{build_test.yml => ci.yml} (69%) diff --git a/.github/workflows/build_test.yml b/.github/workflows/ci.yml similarity index 69% rename from .github/workflows/build_test.yml rename to .github/workflows/ci.yml index 0ff126a539..9113b86788 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/ci.yml @@ -20,14 +20,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - # Require: The version of golangci-lint to use. - # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. - # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. version: v1.53 - - name: Lint code - run: ${GOPATH}/bin/golangci-lint run --disable-all --enable=vet --enable=gofmt --enable=misspell --enable=goconst --min-occurrences=6 - env: - GOPATH: /home/runner/work/woodpecker/go build: runs-on: ubuntu-latest From 539f594d83803d4bd805855c12bc2667d397bcf6 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:54:52 +0700 Subject: [PATCH 23/24] rename ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9113b86788..85493356ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Build and test +name: Tomochain CI on: pull_request: From 9356805b8a492d314a1fa3595781f2a0693281e5 Mon Sep 17 00:00:00 2001 From: terryyyz-coin98 Date: Thu, 13 Jul 2023 16:56:43 +0700 Subject: [PATCH 24/24] revert ci --- build/ci.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ci.go b/build/ci.go index d20d94015e..ea44817049 100644 --- a/build/ci.go +++ b/build/ci.go @@ -271,7 +271,7 @@ func doLint(cmdline []string) { // Run slow linters one by one for _, linter := range []string{"unconvert", "gosimple"} { configs = []string{"--vendor", "--deadline=10m", "--disable-all", "--enable=" + linter} - build.MustRunCommand(filepath.Join(GOBIN, "golangci-lint"), append(configs)...) + build.MustRunCommand(filepath.Join(GOBIN, "golangci-lint"), append(configs, packages...)...) } }