Compare commits

..

No commits in common. "da74b4f9252a9dc2d74b4222049e22772b16a221" and "26c845daad62cd4b42ad06e6853816c84ffe04ca" have entirely different histories.

3 changed files with 47 additions and 25 deletions

45
.drone.yml Normal file
View file

@ -0,0 +1,45 @@
---
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

View file

@ -1,23 +0,0 @@
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

View file

@ -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.52.2; \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell $(GO) env GOPATH)/bin v1.50.1; \
fi
golangci-lint run --timeout 10m
golangci-lint run --timeout 5m