Skip to content

Commit

Permalink
Merge pull request #2 from gostaticanalysis/gha/test
Browse files Browse the repository at this point in the history
github/workflows: add test workflow
  • Loading branch information
tenntenn committed Mar 3, 2021
2 parents bfb5c8e + fd5cee0 commit 1ddce8d
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
- created
- edited

defaults:
run:
shell: bash

jobs:
test:
runs-on: ubuntu-20.04

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x

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

- name: Cache Go module and build cache
uses: actions/cache@v2
with:
key: go-${{ hashFiles('**/go.sum') }}
path: |
~/go/pkg/mod
restore-keys: |
go-
- name: Test and vet
run: |
go vet ./...
go test -v -race ./...

0 comments on commit 1ddce8d

Please sign in to comment.