1
bot/.github/workflows/main.yml

36 lines
738 B
YAML
Raw Permalink Normal View History

name: main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install Go
2024-10-07 16:11:28 +08:00
uses: actions/setup-go@v5
with:
go-version: 1.18
- name: Checkout code
2024-10-07 16:11:28 +08:00
uses: actions/checkout@v4
- name: Run golangci-lint
2024-10-07 16:11:28 +08:00
uses: golangci/golangci-lint-action@v6
with:
2024-10-07 16:13:36 +08:00
version: v1.60
args: --config .golangci.yml
- name: Run tests
run: |
go test -coverprofile=coverage.txt -covermode=atomic ./...
- name: Publish coverage
2024-10-07 16:11:28 +08:00
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt