mirror of https://github.com/maxcnunes/gaper.git
Use Github actions
This commit is contained in:
parent
1fde6281f1
commit
90f855c72b
|
@ -0,0 +1,37 @@
|
|||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
# run only against tags
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
name: Fetch all tags
|
||||
run: git fetch --force --tags
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.19
|
||||
-
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,36 @@
|
|||
on:
|
||||
- push
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
go:
|
||||
- '1.19'
|
||||
- '1.18'
|
||||
- '1.17'
|
||||
- '1.16'
|
||||
- '1.15'
|
||||
env:
|
||||
OS: ${{ matrix.os }}
|
||||
PYTHON: '3.7'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Lint
|
||||
run: make setup && make lint
|
||||
|
||||
- name: Test
|
||||
run: make test
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
29
.travis.yml
29
.travis.yml
|
@ -1,29 +0,0 @@
|
|||
language: go
|
||||
|
||||
go:
|
||||
# - 1.7.x
|
||||
# - 1.8.x
|
||||
# - 1.9.x
|
||||
- 1.10.x
|
||||
# - master
|
||||
|
||||
before_script:
|
||||
- go version
|
||||
- make setup
|
||||
- make lint
|
||||
|
||||
script:
|
||||
- make test
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
skip_cleanup: true
|
||||
script: curl -sL http://git.io/goreleaser | bash
|
||||
on:
|
||||
tags: true
|
|
@ -55,3 +55,6 @@ A single test:
|
|||
go test -run TestSimplePost ./...
|
||||
```
|
||||
|
||||
### Release
|
||||
|
||||
The release runs automatically with a Github action on pushed git tags.
|
||||
|
|
31
appveyor.yml
31
appveyor.yml
|
@ -1,31 +0,0 @@
|
|||
version: "{build}"
|
||||
|
||||
# Source Config
|
||||
|
||||
clone_folder: c:\gopath\src\github.com\maxcnunes\gaper
|
||||
|
||||
# Build host
|
||||
|
||||
environment:
|
||||
GOPATH: c:\gopath
|
||||
GOBIN: c:\gopath\bin
|
||||
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
|
||||
# Build
|
||||
|
||||
install:
|
||||
- set Path=c:\go\bin;c:\gopath\bin;%Path%
|
||||
- go version
|
||||
- go env
|
||||
- go get -u github.com/golang/dep/cmd/dep
|
||||
- choco install make
|
||||
- make setup
|
||||
|
||||
build: false
|
||||
deploy: false
|
||||
|
||||
test_script:
|
||||
- go build github.com/maxcnunes/gaper/cmd/gaper
|
||||
- make test
|
Loading…
Reference in New Issue