Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ci: add github workflows #5

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- "*"

jobs:
build:
strategy:
matrix:
go: ["1.21"]
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- name: build
run: "go build ./..."

test:
strategy:
matrix:
go: ["1.21"]
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- name: test
run: go test -race ./...

golangci:
strategy:
matrix:
go: ["1.21"]
lint: ["v1.55"]
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: ${{ matrix.lint }}