switch to actions #26
45
.drone.yml
45
.drone.yml
@ -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
|
|
23
.gitea/workflows/compliance.yml
Normal file
23
.gitea/workflows/compliance.yml
Normal file
@ -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
|
4
Makefile
4
Makefile
@ -17,6 +17,6 @@ vet: build
|
|||||||
lint:
|
lint:
|
||||||
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
||||||
export BINARY="golangci-lint"; \
|
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
|
fi
|
||||||
golangci-lint run --timeout 5m
|
golangci-lint run --timeout 10m
|
||||||
|
Loading…
Reference in New Issue
Block a user