38 lines
636 B
YAML
38 lines
636 B
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- !main
|
|
- !release/*
|
|
|
|
pull_request:
|
|
|
|
env:
|
|
GOPROXY: ${{ secrets.GOPROXY && secrets.GOPROXY || 'https://goproxy.cn,direct' }}
|
|
RUNNER_TOOL_CACHE: /toolcache
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4.2.0
|
|
with:
|
|
go-version: '1.21'
|
|
|
|
- name: Lint
|
|
# uses: golangci/golangci-lint-action@v3
|
|
uses: actions/golangci-lint-action@v3
|
|
with:
|
|
version: latest
|
|
install-mode: goinstall
|
|
|
|
- name: Tests
|
|
run: |
|
|
go test $(go list ./...)
|
|
|