CI: generate codecov.yml before tests (#3280)

This commit is contained in:
mmetc 2024-10-10 11:09:26 +02:00 committed by GitHub
parent b9bccfa56f
commit 4ea0537d0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 11 deletions

View file

@ -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 <<EOT
# we measure coverage but don't enforce it

View file

@ -43,6 +43,10 @@ jobs:
run: |
make clean bats-build bats-fixture BUILD_STATIC=1
- name: Generate codecov configuration
run: |
.github/generate-codecov-yml.sh >> .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:

View file

@ -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:

View file

@ -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