From 953ad18aa5dfcaaf56477d000388b5ba675ba059 Mon Sep 17 00:00:00 2001 From: Toma Puljak Date: Mon, 22 Apr 2024 10:21:25 +0000 Subject: [PATCH] chore: add PR test action Signed-off-by: Toma Puljak --- .github/workflows/lint_pr.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint_pr.yaml b/.github/workflows/lint_pr.yaml index 0e2403c95a..a35f9d64b9 100644 --- a/.github/workflows/lint_pr.yaml +++ b/.github/workflows/lint_pr.yaml @@ -36,4 +36,18 @@ jobs: ./hack/swagger.sh go fmt ./... git diff --exit-code pkg/serverapiclient/* || (echo "API clients are out of sync! Please generate with './hack/swagger.sh' and commit" && exit 1) - git diff --exit-code '**/*.go' || (echo "Code is not formatted! Please run 'go fmt ./...' and commit" && exit 1) \ No newline at end of file + git diff --exit-code '**/*.go' || (echo "Code is not formatted! Please run 'go fmt ./...' and commit" && exit 1) + test: + name: Unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: false + - run: go build -tags testing ./... + - uses: robherley/go-test-action@v0 + with: + testArguments: -tags testing ./... + omit: untested \ No newline at end of file