diff --git a/.github/codecov-ignore-generated.sh b/.github/generate-codecov-yml.sh similarity index 89% rename from .github/codecov-ignore-generated.sh rename to .github/generate-codecov-yml.sh index 0f59b1de4a0..cc2d652e339 100755 --- a/.github/codecov-ignore-generated.sh +++ b/.github/generate-codecov-yml.sh @@ -2,7 +2,7 @@ # Run this from the repository root: # -# .github/codecov-ignore-generated.sh >> .github/codecov.yml +# .github/generate-codecov-yml.sh >> .github/codecov.yml cat <> .github/codecov.yml + - name: "Run tests" run: ./test/run-tests ./test/bats --formatter $(pwd)/test/lib/color-formatter @@ -79,10 +83,6 @@ jobs: run: for file in $(find ./test/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done if: ${{ always() }} - - name: Ignore-list of generated files for codecov - run: | - .github/codecov-ignore-generated.sh >> .github/codecov.yml - - name: Upload bats coverage to codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/go-tests-windows.yml b/.github/workflows/go-tests-windows.yml index 488756d0059..ba283f3890a 100644 --- a/.github/workflows/go-tests-windows.yml +++ b/.github/workflows/go-tests-windows.yml @@ -40,6 +40,10 @@ jobs: run: | make build BUILD_RE2_WASM=1 + - name: Generate codecov configuration + run: | + .github/generate-codecov-yml.sh >> .github/codecov.yml + - name: Run tests run: | go install github.com/kyoh86/richgo@v0.3.10 @@ -47,10 +51,6 @@ jobs: if(!$?) { cat out.txt | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter; Exit 1 } cat out.txt | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter - - name: Ignore-list of generated files for codecov - run: | - .github/codecov-ignore-generated.sh >> .github/codecov.yml - - name: Upload unit coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index 52de434ad9b..225c1b57628 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -145,6 +145,10 @@ jobs: aws --endpoint-url=http://127.0.0.1:4566 --region us-east-1 kinesis create-stream --stream-name stream-1-shard --shard-count 1 aws --endpoint-url=http://127.0.0.1:4566 --region us-east-1 kinesis create-stream --stream-name stream-2-shards --shard-count 2 + - name: Generate codecov configuration + run: | + .github/generate-codecov-yml.sh >> .github/codecov.yml + - name: Build and run tests, static run: | sudo apt -qq -y -o=Dpkg::Use-Pty=0 install build-essential libre2-dev @@ -165,9 +169,9 @@ jobs: set -o pipefail make go-acc | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter - - name: Ignore-list of generated files for codecov + - name: Generate codecov configuration run: | - .github/codecov-ignore-generated.sh >> .github/codecov.yml + .github/generate-codecov-yml.sh >> .github/codecov.yml - name: Upload unit coverage to Codecov uses: codecov/codecov-action@v4