Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: generate codecov.yml before tests #3280

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/bats-sqlite-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/go-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ 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
go test -tags expr_debug -coverprofile coverage.out -covermode=atomic ./... > out.txt
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:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down