Skip to content

Commit

Permalink
ci: add a workflow file for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
t2y committed Apr 22, 2024
1 parent 72d4f64 commit f750048
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Go

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [
'1.22',
'1.21',
]

steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version

- name: Install dependencies
run: go mod download

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

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Test
run: make test

0 comments on commit f750048

Please sign in to comment.