diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2c5a5ad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: Go Test + +on: + push: + branches: + - "**" # run on pushes to any branch in this repository + pull_request: + branches: + - "**" # still run on PRs + workflow_dispatch: {} # allow manual runs from the Actions UI + +jobs: + test: + runs-on: ubuntu-latest + + steps: + # 1. Checkout the PR code + - name: Checkout code + uses: actions/checkout@v4 + + # 2. Set up Go + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: "1.26.4" + + - name: Download Go modules + run: go mod tidy -v + + # Run tests + - name: Run tests + run: go test ./... -v