From e4308057b364ca81d67ec3074032e3688801ed82 Mon Sep 17 00:00:00 2001 From: Daniil Porokhnin Date: Wed, 24 Sep 2025 22:36:16 +0300 Subject: [PATCH 1/2] ci: run tests with race detector --- .github/workflows/ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5497befd..8bc5eba4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,10 @@ concurrency: jobs: test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + flags: [ '', '-race' ] steps: # GitHub Actions do not support passing arguments to containers (that are declared in the services section of a job), # but MinIO depends on it (it needs `server` argument at least). @@ -47,17 +51,19 @@ jobs: env: GOFLAGS: ${{ matrix.flags }} LOG_LEVEL: error - run: go test -short -coverprofile=profile.out -covermode=atomic -coverpkg=./... ./... + run: go test -short -coverprofile=profile${{ matrix.flags }}.out -covermode=atomic -coverpkg=./... ./... - name: Strip generated files from coverage run: | - grep -v -e ".pb.go:" -e ".pb.gw.go:" -e ".mock.go:" -e "/mock/" profile.out > profile.out.clean + grep -v -e ".pb.go:" -e ".pb.gw.go:" -e ".mock.go:" -e "/mock/" profile${{ matrix.flags }}.out > profile${{ matrix.flags }}.out.clean - name: Upload artifact uses: actions/upload-artifact@v5 with: name: coverage - path: profile.out.clean + path: | + profile.out.clean + profile-race.out.clean if-no-files-found: error retention-days: 1 @@ -78,7 +84,7 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - files: profile.out.clean + files: profile.out.clean, profile-race.out.clean lint: runs-on: ubuntu-latest From d5e0ab62fb82e120cd529b0398108ebc2d9d4460 Mon Sep 17 00:00:00 2001 From: Daniil Porokhnin Date: Wed, 24 Sep 2025 22:52:49 +0300 Subject: [PATCH 2/2] ci: increase tests timeout --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bc5eba4..f593149f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: env: GOFLAGS: ${{ matrix.flags }} LOG_LEVEL: error - run: go test -short -coverprofile=profile${{ matrix.flags }}.out -covermode=atomic -coverpkg=./... ./... + run: go test -timeout=30m -short -coverprofile=profile${{ matrix.flags }}.out -covermode=atomic -coverpkg=./... ./... - name: Strip generated files from coverage run: | @@ -61,9 +61,7 @@ jobs: uses: actions/upload-artifact@v5 with: name: coverage - path: | - profile.out.clean - profile-race.out.clean + path: profile${{ matrix.flags }}.out.clean if-no-files-found: error retention-days: 1