parent
3ab0f8aa2e
commit
9b8e7ff1ba
50
.github/workflows/go.yml
vendored
50
.github/workflows/go.yml
vendored
@ -1,17 +1,37 @@
|
|||||||
workspace:
|
name: Go
|
||||||
base: /srv/drone-demo
|
|
||||||
path: .
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
pipeline:
|
|
||||||
build:
|
build:
|
||||||
image: golang
|
name: Build
|
||||||
# pull: true
|
runs-on: ubuntu-latest
|
||||||
commands:
|
steps:
|
||||||
- pwd
|
|
||||||
- ls
|
- name: Set up Go 1.x
|
||||||
- go env -w GOPROXY=https://goproxy.io,direct
|
uses: actions/setup-go@v2
|
||||||
- go get -u github.com/aliyun/alibaba-cloud-sdk-go/sdk
|
with:
|
||||||
- go get -u github.com/aliyun/alibaba-cloud-sdk-go/services/alidns
|
go-version: ^1.13
|
||||||
- go mod init alidns
|
id: go
|
||||||
- go mod tidy
|
|
||||||
- go build alidns.go
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: |
|
||||||
|
go get -v -t -d ./...
|
||||||
|
if [ -f Gopkg.toml ]; then
|
||||||
|
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||||
|
dep ensure
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: go build -v .
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: go test -v .
|
||||||
|
Reference in New Issue
Block a user