diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index dd0fc13..0000000 --- a/.drone.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -kind: pipeline -name: compliance - -platform: - os: linux - arch: arm64 - -trigger: - event: - - pull_request - -steps: - - name: check - pull: always - image: golang:1.14 - environment: - GOPROXY: https://goproxy.cn - commands: - - make build - - make lint - - make vet - ---- -kind: pipeline -name: build-master - -platform: - os: linux - arch: amd64 - -trigger: - branch: - - master - event: - - push - -steps: - - name: build - pull: always - image: techknowlogick/xgo:latest - environment: - GOPROXY: https://goproxy.cn - commands: - - make build \ No newline at end of file diff --git a/.gitea/workflows/compliance.yml b/.gitea/workflows/compliance.yml new file mode 100644 index 0000000..96dc9ee --- /dev/null +++ b/.gitea/workflows/compliance.yml @@ -0,0 +1,23 @@ +name: build and test + +on: + - push + - pull_request + +jobs: + lint: + name: build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: setup go + uses: https://github.com/actions/setup-go@v4 + with: + go-version: '>=1.20.1' + - name: Build + env: + GOPROXY: https://goproxy.io,direct + run: | + make build + make lint + make vet diff --git a/Makefile b/Makefile index b60a001..4bb377e 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,6 @@ vet: build lint: @hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ export BINARY="golangci-lint"; \ - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell $(GO) env GOPATH)/bin v1.50.1; \ + curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell $(GO) env GOPATH)/bin v1.52.2; \ fi - golangci-lint run --timeout 5m + golangci-lint run --timeout 10m