From 65ead601fd4ce571558f5c009ac5bbbe809d1d67 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 25 Sep 2024 10:09:55 -0400 Subject: [PATCH] ci: run all tests in one group --- .github/workflows/coverage.yml | 61 ++++------------------------------ 1 file changed, 6 insertions(+), 55 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e7510ce162..d33aff00a0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -6,35 +6,6 @@ on: - v0.34.x-celestia jobs: - split-test-files: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 - with: - go-version: "1.23.1" - - name: Create a file with all the pkgs - run: go list ./... > pkgs.txt - - name: Split pkgs into 4 files - run: split -d -n l/4 pkgs.txt pkgs.txt.part. - # cache multiple - - uses: actions/upload-artifact@v4 - with: - name: "${{ github.sha }}-00" - path: ./pkgs.txt.part.00 - - uses: actions/upload-artifact@v4 - with: - name: "${{ github.sha }}-01" - path: ./pkgs.txt.part.01 - - uses: actions/upload-artifact@v4 - with: - name: "${{ github.sha }}-02" - path: ./pkgs.txt.part.02 - - uses: actions/upload-artifact@v4 - with: - name: "${{ github.sha }}-03" - path: ./pkgs.txt.part.03 - build-linux: name: Build runs-on: ubuntu-latest @@ -62,11 +33,8 @@ jobs: tests: runs-on: ubuntu-latest - needs: split-test-files strategy: - fail-fast: false - matrix: - part: ["00", "01", "02", "03"] + fail-fast: true steps: - uses: actions/setup-go@v5 with: @@ -78,18 +46,13 @@ jobs: **/**.go go.mod go.sum - - uses: actions/download-artifact@v4.1.8 - with: - name: "${{ github.sha }}-${{ matrix.part }}" - if: env.GIT_DIFF - name: test & coverage report creation - run: | - cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 15m -race -coverprofile=${{ matrix.part }}profile.out -covermode=atomic + run: go test ./... -mod=readonly -timeout 15m -race -coverprofile=profile.out -covermode=atomic if: env.GIT_DIFF - uses: actions/upload-artifact@v4 with: - name: "${{ github.sha }}-${{ matrix.part }}-coverage" - path: ./${{ matrix.part }}profile.out + name: "${{ github.sha }}-coverage" + path: ./profile.out upload-coverage-report: runs-on: ubuntu-latest @@ -104,22 +67,10 @@ jobs: go.sum - uses: actions/download-artifact@v4.1.8 with: - name: "${{ github.sha }}-00-coverage" - if: env.GIT_DIFF - - uses: actions/download-artifact@v4.1.8 - with: - name: "${{ github.sha }}-01-coverage" - if: env.GIT_DIFF - - uses: actions/download-artifact@v4.1.8 - with: - name: "${{ github.sha }}-02-coverage" - if: env.GIT_DIFF - - uses: actions/download-artifact@v4.1.8 - with: - name: "${{ github.sha }}-03-coverage" + name: "${{ github.sha }}-coverage" if: env.GIT_DIFF - run: | - cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt + cat ./profile.out | grep -v "mode: atomic" >> coverage.txt if: env.GIT_DIFF - uses: codecov/codecov-action@v4 with: