Skip to content

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
qba73 authored Jun 7, 2024
1 parent 9aed79c commit 0484bb2
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Based on https://github.com/mvdan/github-actions-golang
on: [push, pull_request, workflow_dispatch]
name: Tests
jobs:

build:
test:
strategy:
matrix:
go-version: ['stable']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test ./...
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: golang/govulncheck-action@v1
with:
go-version-input: 1.22.4
gocritic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Test
run: go test -v ./...
- uses: actions/setup-go@v4
- uses: actions/checkout@v3
- run: |
go install github.com/go-critic/go-critic/cmd/gocritic@latest
gocritic check .

0 comments on commit 0484bb2

Please sign in to comment.