|
| 1 | +# Keep its logic in sync with spockbench.yml! |
| 2 | + |
| 3 | +name: Z0DAN Sync long-lasting test |
| 4 | +on: |
| 5 | + workflow_dispatch: |
| 6 | + pull_request: |
| 7 | + types: [opened, synchronize, reopened] |
| 8 | + schedule: |
| 9 | + - cron: '0 22 * * 6' # Saturday, 22:00 (UTC) |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + pull-and-test: |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | + os: [ubuntu-latest] |
| 20 | + pgver: [15, 16, 17, 18] |
| 21 | + |
| 22 | + runs-on: ${{ matrix.os }} |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Checkout spock |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + ref: ${{ github.ref }} |
| 29 | + |
| 30 | + - name: Add permissions |
| 31 | + run: | |
| 32 | + sudo chmod -R a+w ${GITHUB_WORKSPACE} |
| 33 | +
|
| 34 | + - name: Set up Docker |
| 35 | + # Codacy wants us to use full commit SHA. This is for v3 |
| 36 | + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 |
| 37 | + |
| 38 | + - name: Set up docker compose |
| 39 | + # Codacy wants us to use full commit SHA. This is for v1 |
| 40 | + uses: docker/setup-compose-action@364cc21a5de5b1ee4a7f5f9d3fa374ce0ccde746 # v1 |
| 41 | + with: |
| 42 | + version: latest |
| 43 | + |
| 44 | + - name: Build docker container |
| 45 | + run: | |
| 46 | + cd ${GITHUB_WORKSPACE}/ |
| 47 | + ls -la |
| 48 | + ls -la sql |
| 49 | + ls -la tests/ |
| 50 | + ls -la tests/tap |
| 51 | + ls -la tests/tap/t |
| 52 | + cat tests/tap/t/011_zodan_sync_third.pl |
| 53 | + docker build \ |
| 54 | + --build-arg PGVER=${{ matrix.pgver }} \ |
| 55 | + -t spock -f tests/docker/Dockerfile-step-1.el9 . |
| 56 | +
|
| 57 | + - name: Run picked TAP tests |
| 58 | + run: | |
| 59 | + TAP_CT_NAME="spock-tap-${{ matrix.pgver }}-${{ github.run_id }}-${{ github.run_attempt }}" |
| 60 | + echo "TAP_CT_NAME=$TAP_CT_NAME" >> "$GITHUB_ENV" |
| 61 | + docker run --name "$TAP_CT_NAME" -e PGVER=${{ matrix.pgver }} spock /home/pgedge/run-spock-tap.sh "t/011_zodan_sync_third.pl" 10 |
| 62 | + timeout-minutes: 1440 |
| 63 | + |
| 64 | + - name: Collect TAP artifacts (from container) |
| 65 | + if: ${{ always() }} |
| 66 | + run: | |
| 67 | + docker cp "$TAP_CT_NAME":/home/pgedge/spock/ "$GITHUB_WORKSPACE/results" || true |
| 68 | + docker rm -f "$TAP_CT_NAME" || true |
| 69 | +
|
| 70 | + - name: Upload TAP artifacts |
| 71 | + if: ${{ always() }} |
| 72 | + uses: actions/upload-artifact@v4 |
| 73 | + with: |
| 74 | + name: tap-${{ matrix.pgver }} |
| 75 | + path: | |
| 76 | + ${{ github.workspace }}/results |
| 77 | + if-no-files-found: ignore |
| 78 | + retention-days: 7 |
0 commit comments