Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Feb 11, 2022
1 parent 0c4842b commit 1b87dc4
Showing 1 changed file with 59 additions and 21 deletions.
80 changes: 59 additions & 21 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,70 @@
name: Go

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

jobs:
gobuild:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

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

govet:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: go vet
run: go vet -v ./...

testing:
gotest:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build
run: go build -v ./...
- name: go test
env:
token: ${{ secrets.TOKEN }}
run: go test -v ./...

gostaticcheck:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Test
env:
token: ${{ secrets.TOKEN }}
run: go test -v ./...
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Lint
uses: Jerome1337/[email protected]
with:
golint-path: './...'
- name: go staticcheck
uses: dominikh/[email protected]

0 comments on commit 1b87dc4

Please sign in to comment.