diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 44042c17..6920d812 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -50,7 +50,6 @@ jobs: go.sum - name: Build run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build - if: env.GIT_DIFF split-test-files: runs-on: self-hosted @@ -102,11 +101,9 @@ jobs: - uses: actions/download-artifact@v3 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 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock goleveldb' - if: env.GIT_DIFF - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-coverage" @@ -126,22 +123,17 @@ jobs: - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-00-coverage" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-01-coverage" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-02-coverage" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-03-coverage" - if: env.GIT_DIFF - run: | cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt - if: env.GIT_DIFF - name: filter out DONTCOVER run: | excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')" @@ -153,12 +145,10 @@ jobs: echo "Excluding ${filename} from coverage report..." sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done - if: env.GIT_DIFF - uses: codecov/codecov-action@v3.1.0 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.txt - if: env.GIT_DIFF test-integration: runs-on: self-hosted @@ -181,11 +171,9 @@ jobs: - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" - if: env.GIT_DIFF - name: test & coverage report creation run: | xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -json -timeout 30m -tags='cli_test goleveldb' | tee ${{ matrix.part }}-integration-output.txt - if: env.GIT_DIFF - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-integration-output" @@ -206,27 +194,21 @@ jobs: - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-00-integration-output" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-01-integration-output" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-02-integration-output" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-03-integration-output" - if: env.GIT_DIFF - uses: actions/cache@v3.0.5 with: path: ~/go/bin key: ${{ runner.os }}-go-tparse-binary - if: env.GIT_DIFF - name: Generate integration test report run: cat ./*-integration-output.txt | ~/go/bin/tparse - if: env.GIT_DIFF test-integration-multi-node: runs-on: self-hosted @@ -249,11 +231,9 @@ jobs: - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}" - if: env.GIT_DIFF - name: test report creation run: | xargs --arg-file=pkgs.txt.part.${{ matrix.part }} go test -mod=readonly -json -timeout 30m -tags='cli_multi_node_test goleveldb' | tee ${{ matrix.part }}-integration-multi-node-output.txt - if: env.GIT_DIFF - uses: actions/upload-artifact@v3 with: name: "${{ github.sha }}-${{ matrix.part }}-integration-multi-node-output" @@ -274,27 +254,21 @@ jobs: - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-00-integration-multi-node-output" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-01-integration-multi-node-output" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-02-integration-multi-node-output" - if: env.GIT_DIFF - uses: actions/download-artifact@v3 with: name: "${{ github.sha }}-03-integration-multi-node-output" - if: env.GIT_DIFF - uses: actions/cache@v3.0.5 with: path: ~/go/bin key: ${{ runner.os }}-go-tparse-binary - if: env.GIT_DIFF - name: Generate multi node integration test report run: cat ./*-integration-multi-node-output.txt | ~/go/bin/tparse - if: env.GIT_DIFF test-localnet-blocks: runs-on: self-hosted