Skip to content

Commit

Permalink
feat: ci (#2)
Browse files Browse the repository at this point in the history
* feat: ci

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* feat: 1.16

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: goreleaser with 1.16 too

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Feb 6, 2021
1 parent 55b4d8f commit f8f8de2
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: build
on: [push, pull_request]

jobs:
build:
strategy:
matrix:
go-version: [1.16.0-rc1]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
stable: false

- name: Checkout code
uses: actions/checkout@v2

- name: Download Go modules
run: go mod download

- name: Build
run: go build -v ./...

- name: Test
run: go test ./...
27 changes: 27 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: goreleaser

on:
pull_request:
push:

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.0-rc1
stable: false
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --snapshot --skip-publish --skip-sign --rm-dist
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: lint
on:
push:
pull_request:

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.36
only-new-issues: true

0 comments on commit f8f8de2

Please sign in to comment.