Skip to content

Commit

Permalink
Add: github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fufuok committed Oct 20, 2021
1 parent 9e6750c commit bdb5f76
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os}}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Fetch Repository
uses: actions/checkout@v2
- name: Make Ready
run: |
go version
go env
go get -t -v ./...
git rev-parse --short HEAD
- name: Run Test
run: go test -v -cover -covermode=atomic -race ./...
bench:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: Fetch Repository
uses: actions/checkout@v2
- name: Run Benchmark
run: go test -run=^$ -benchmem -benchtime=1s -bench=.

0 comments on commit bdb5f76

Please sign in to comment.