Skip to content

Commit

Permalink
ci: add test and releaser steps
Browse files Browse the repository at this point in the history
  • Loading branch information
anilmisirlioglu committed Apr 9, 2022
1 parent 56ea4e4 commit e8dea2a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/depandabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release

on:
push:
tags:
- '*'

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.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test

on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.17

- name: Ensure gofmt
run: test -z "$(gofmt -s -d .)"

- name: Ensure go.mod is already tidied
run: go mod tidy

- name: Run unit tests
run: go test ./... -v -race -coverprofile=coverage.txt -covermode=atomic

0 comments on commit e8dea2a

Please sign in to comment.