Skip to content

add CI github action #1

add CI github action

add CI github action #1

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Install gofumpt
run: go install mvdan.cc/[email protected]
- name: Install dependencies
run: make deps || exit 1
- name: Lint
run: make lint || exit 1
- name: Check format
run: make format || exit 1
- name: Run tests
run: make test || exit 1