forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 14
Extract code coverage jobs into separate CI workflow #236
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5e3d746
Specifiy extensions required for tde test in EXTRA_INSTALL
artemgavrilov b24d3ab
Extract code coverage jobs into separate CI workflow
artemgavrilov e2507d5
Run simple tests for code coverage needs
artemgavrilov 36292c8
Highlight that code coverage badge in main readme file related to pg_tde
artemgavrilov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Code coverage | ||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - TDE_REL_17_STABLE | ||
|
|
||
| jobs: | ||
| collect: | ||
| name: Collect and upload | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Clone repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Install dependencies | ||
| run: ci_scripts/ubuntu-deps.sh | ||
|
|
||
| - name: Build postgres | ||
| run: ci_scripts/make-build.sh debug --enable-coverage | ||
|
|
||
| - name: Setup kmip and vault | ||
| run: ci_scripts/setup-keyring-servers.sh | ||
|
|
||
| - name: Test postgres with TDE to generate coverage | ||
| run: ci_scripts/make-test.sh --tde-only | ||
|
|
||
| - name: Collect coverage data | ||
| run: find . -type f -name "*.c" ! -path '*libkmip*' | xargs -t gcov -abcfu | ||
| working-directory: contrib/pg_tde | ||
|
|
||
| - name: Upload coverage data to codecov.io | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| verbose: true | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| working-directory: contrib/pg_tde | ||
| files: "*.c.gcov" | ||
|
|
||
| - name: Report on test fail | ||
| uses: actions/upload-artifact@v4 | ||
| if: ${{ failure() }} | ||
| with: | ||
| name: coverage-testlog-tde | ||
| path: | | ||
| build/testrun/ | ||
| contrib/pg_tde/t/ | ||
| contrib/pg_tde/results | ||
| contrib/pg_tde/regression.diffs | ||
| contrib/pg_tde/regression.out | ||
| contrib/pg_tde/*.gcov | ||
| retention-days: 3 | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
| ADD_FLAGS= | ||
|
|
||
| for arg in "$@" | ||
| do | ||
| case "$arg" in | ||
| --continue) | ||
| ADD_FLAGS="-k" | ||
| shift;; | ||
| esac | ||
| done | ||
|
|
||
| SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)" | ||
| source $SCRIPT_DIR/env.sh | ||
| source $SCRIPT_DIR/configure-global-tde.sh | ||
|
|
||
| EXTRA_REGRESS_OPTS="--extra-setup=$SCRIPT_DIR/tde_setup.sql" make -s installcheck-world $ADD_FLAGS |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,26 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
| TDE_ONLY=0 | ||
|
|
||
| for arg in "$@" | ||
| do | ||
| case "$arg" in | ||
| --tde-only) | ||
| TDE_ONLY=1 | ||
| shift;; | ||
| esac | ||
| done | ||
|
|
||
| SCRIPT_DIR="$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)" | ||
| INSTALL_DIR="$SCRIPT_DIR/../../pginst" | ||
| source $SCRIPT_DIR/env.sh | ||
|
|
||
| cd "$SCRIPT_DIR/.." | ||
|
|
||
| make -s check-world | ||
| if [ "$TDE_ONLY" -eq 1 ]; | ||
| then | ||
| cd "$SCRIPT_DIR/../contrib/pg_tde" | ||
| make -s check | ||
| else | ||
| cd "$SCRIPT_DIR/.." | ||
| make -s check-world | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this also have a
--continueflag? Otherwise a failing test will also result in a lower coverage, because the test stops early.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you talking about
make-test, notmake-build. If some test failed coverage report would not be uploaded at all (and should not). As I understood--keep-goingoption inmakeis needed for situation where we have targetAthat depends on targetsBandC, and ifBfailed withkeep-goingoption make still will executeC. If that's how it work then it's redundant here as we run only pg-tde tests here, am I wrong?