add unit test workflow

This commit is contained in:
Roy Crihfield 2024-07-04 11:30:02 +08:00
parent 4b1dd89dbe
commit a5cf8c42e9

21
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Test
on:
pull_request:
branches: '*'
push:
branches:
- main
jobs:
test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
check-latest: true
- name: Run unit tests
run: go test -v -p 1 ./...