From c9e45612783274b2693e7c7533e2d72ee45dae18 Mon Sep 17 00:00:00 2001 From: TJ Hoplock Date: Wed, 15 Jan 2025 00:17:57 -0500 Subject: [PATCH] ci: add workflow to run tests on PRs Signed-off-by: TJ Hoplock --- .github/workflows/tests.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..0ac4f7b --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,32 @@ +name: tests +on: + push: + tags: + - v* + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.23.0' + cache: true + - name: Go Preflight Tests + run: | + go mod tidy + go test -v ./...