From 5f09a6a5e5bae409580bae61602d1492f3a6e5ee Mon Sep 17 00:00:00 2001 From: danl5 Date: Fri, 10 May 2024 22:28:31 +0800 Subject: [PATCH] workflow: go check --- .github/workflows/go-check.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/go-check.yml diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml new file mode 100644 index 0000000..5c59775 --- /dev/null +++ b/.github/workflows/go-check.yml @@ -0,0 +1,22 @@ +name: Go Check + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '^1.21' + + - name: Install dependencies + run: go mod tidy + + - name: Lint + run: golangci-lint run ./... + + - name: Test + run: go test ./... \ No newline at end of file