From 9723b1e65ce95f76d63971b26f7dd8ca28e22bf6 Mon Sep 17 00:00:00 2001 From: Kevin Kruger Date: Tue, 3 Dec 2024 10:50:51 -0500 Subject: [PATCH] run tests with gotestsum --- .github/workflows/main.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad6a525a..b4a12bfe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,8 +33,23 @@ jobs: - name: Install dependencies run: go mod tidy - - name: Run tests - run: go test ./... -coverprofile=coverage.out + - name: Install gotestsum + run: go install gotest.tools/gotestsum@latest + + - name: Run tests with gotestsum + run: | + mkdir -p ${{ github.workspace }}/artifacts + mkdir -p ${{ github.workspace }}/reports + + GONFALON_MODE=test \ + gotestsum --packages="./..." \ + --junitfile ${{ github.workspace }}/reports/go-test_go_tests.xml \ + --jsonfile ${{ github.workspace }}/artifacts/go-test_go_tests.json \ + --rerun-fails=2 \ + --rerun-fails-max-failures=10 \ + --rerun-fails-report ${{ github.workspace }}/artifacts/rerun_tests_go_tests.txt \ + -- -tags=launchdarkly_easyjson -p=1 + e2e-tests: runs-on: ubuntu-latest