Skip to content

Commit

Permalink
add lint/test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
yiling authored and yiling committed Nov 19, 2024
1 parent e6619b1 commit 64ac8c1
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Go

on:
push:
branches: ['*', '*/*']
tags: ['v*']
pull_request:
branches: ['*']

permissions:
contents: read

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
test:
name: test
strategy:
matrix:
go: ["1.21.x"]
runs-on: ubuntu-latest
steps:
- name: Setup Go
with:
go-version: ${{ matrix.go }}
uses: actions/setup-go@v2

- uses: actions/checkout@v2

- name: Test
run: go test ./...

0 comments on commit 64ac8c1

Please sign in to comment.