Skip to content

re-organize event system and add audit check #9

re-organize event system and add audit check

re-organize event system and add audit check #9

Workflow file for this run

name: build and test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
args: --timeout 8m --verbose
version: v1.56
skip-pkg-cache: true
skip-build-cache: true
go_mod_tidy_check:
name: Mod Tidy Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go mod tidy
- name: check for diff
run: git diff --exit-code
test:
needs: [lint, go_mod_tidy_check]
name: Unit tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run tests
run: go test -coverprofile=coverage.txt -covermode=atomic ./...