Skip to content

style: support golangci-lint #10

style: support golangci-lint

style: support golangci-lint #10

Workflow file for this run

name: Unit Test
on:
push:
branches:
- master
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.17', '1.18', '1.19', '1.20', '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 tidy
- name: Run Tests
run: |
chmod +x ./scripts/run_tests.sh
./scripts/run_tests.sh
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go 1.21
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest