-
Notifications
You must be signed in to change notification settings - Fork 45
SPOC-345: Move zodan sync test to separate github action #274
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 2 commits
Commits
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,77 @@ | ||
| # Keep its logic in sync with spockbench.yml! | ||
|
|
||
| name: Z0DAN Sync long-lasting test | ||
| run-name: Add new node into highly loaded multi-master configuration | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 22 * * 6' # Saturday, 22:00 (UTC) | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| pull-and-test: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest] | ||
| pgver: [15, 16, 17, 18] | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| steps: | ||
| - name: Checkout spock | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.ref }} | ||
|
|
||
| - name: Add permissions | ||
| run: | | ||
| sudo chmod -R a+w ${GITHUB_WORKSPACE} | ||
|
|
||
| - name: Set up Docker | ||
| # Codacy wants us to use full commit SHA. This is for v3 | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 | ||
|
|
||
| - name: Set up docker compose | ||
| # Codacy wants us to use full commit SHA. This is for v1 | ||
| uses: docker/setup-compose-action@364cc21a5de5b1ee4a7f5f9d3fa374ce0ccde746 # v1 | ||
| with: | ||
| version: latest | ||
|
|
||
| - name: Build docker container | ||
| run: | | ||
| cd ${GITHUB_WORKSPACE}/ | ||
| ls -la | ||
mason-sharp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ls -la sql | ||
| ls -la tests/ | ||
| ls -la tests/tap | ||
| ls -la tests/tap/t | ||
| cat tests/tap/t/011_zodan_sync_third.pl | ||
| docker build \ | ||
| --build-arg PGVER=${{ matrix.pgver }} \ | ||
| -t spock -f tests/docker/Dockerfile-step-1.el9 . | ||
|
|
||
| - name: Run picked TAP tests | ||
| run: | | ||
| TAP_CT_NAME="spock-tap-${{ matrix.pgver }}-${{ github.run_id }}-${{ github.run_attempt }}" | ||
| echo "TAP_CT_NAME=$TAP_CT_NAME" >> "$GITHUB_ENV" | ||
| docker run --name "$TAP_CT_NAME" -e PGVER=${{ matrix.pgver }} spock /home/pgedge/run-spock-tap.sh "t/011_zodan_sync_third.pl" 10 | ||
| timeout-minutes: 1440 | ||
|
|
||
| - name: Collect TAP artifacts (from container) | ||
| if: ${{ always() }} | ||
| run: | | ||
| docker cp "$TAP_CT_NAME":/home/pgedge/spock/ "$GITHUB_WORKSPACE/results" || true | ||
| docker rm -f "$TAP_CT_NAME" || true | ||
|
|
||
| - name: Upload TAP artifacts | ||
| if: ${{ always() }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: tap-${{ matrix.pgver }} | ||
| path: | | ||
| ${{ github.workspace }}/results | ||
| if-no-files-found: ignore | ||
| retention-days: 7 | ||
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
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,43 @@ | ||
| #!/bin/bash | ||
| ### | ||
| ### Run selected TAP tests iteratively | ||
| ### | ||
|
|
||
|
|
||
| export PG_CONFIG=/home/pgedge/pgedge/pg${PGVER}/bin/pg_config | ||
| export PATH=/home/pgedge/pgedge/pg${PGVER}/bin:$PATH | ||
| export LD_LIBRARY_PATH=/home/pgedge/pgedge/pg${PGVER}/lib/:$LD_LIBRARY_PATH | ||
| export PROVE_TESTS=$proven_tests | ||
mason-sharp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # PGVER should be previously set in the environment | ||
| if [ -z "${PGVER}" ] | ||
| then | ||
| echo "The PGVER environment variable must be set before running this command" | ||
| exit 1 | ||
| fi | ||
|
|
||
| proven_tests="$1" | ||
| iterations="$2" | ||
| if [[ -z "$proven_tests" || -z "$iterations" ]]; then | ||
| echo "Command-line parameters are set incorrectly" | ||
| exit 1 | ||
| fi | ||
|
|
||
| cd /home/pgedge/spock/ | ||
|
|
||
| status=0 | ||
| for i in $(seq 1 $iterations); do | ||
| echo "Iteration $i: running make check..." | ||
| env PROVE_TESTS="$proven_tests" make check_prove 1>out.txt 2>err.txt | ||
| status=$? | ||
| if [ $status -ne 0 ]; then | ||
| echo "make check failed with status $status on iteration $i" | ||
| break | ||
| fi | ||
| done | ||
|
|
||
| if [ $status -ne 0 ] | ||
| then | ||
| echo "Errors in regression checks" | ||
| exit 1 | ||
| 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.
Uh oh!
There was an error while loading. Please reload this page.