Skip to content

Commit 8bafb86

Browse files
authored
Merge pull request #5963 from sysown/fix/taptests-pgsql-cluster-caller
Convert CI-taptests-pgsql-cluster to caller/reusable split
2 parents 8ca2df5 + 27d2e22 commit 8bafb86

1 file changed

Lines changed: 6 additions & 83 deletions

File tree

.github/workflows/CI-taptests-pgsql-cluster.yml

Lines changed: 6 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -11,88 +11,11 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.workflow_run && github.event.workflow_run.head_branch || github.ref_name }}
1212
cancel-in-progress: true
1313

14-
env:
15-
SHA: ${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.sha }}
16-
1714
jobs:
18-
tests:
19-
runs-on: ubuntu-22.04
20-
# `write-all` is required so the workflow_run event's GITHUB_TOKEN has
21-
# the cache-writable scope (GitHub started enforcing this for workflow_run
22-
# in early July 2026). Without it actions/cache/save@v4 fails with
23-
# 'cache write denied: token has no writable scopes'.
24-
permissions: write-all
15+
run:
2516
if: ${{ github.event.workflow_run && github.event.workflow_run.conclusion == 'success' || ! github.event.workflow_run }}
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
testdist: [ 'ubuntu22-tap' ]
30-
env:
31-
TESTDIST: ${{ matrix.testdist }}
32-
BLDCACHE: ${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.sha }}_${{ matrix.testdist }}
33-
34-
steps:
35-
36-
- name: Checkout
37-
uses: actions/checkout@v4
38-
39-
- name: Cache restore src
40-
id: cache-src
41-
uses: actions/cache/restore@v4
42-
with:
43-
key: ${{ env.BLDCACHE }}_src
44-
fail-on-cache-miss: true
45-
path: |
46-
src/
47-
48-
- name: Cache restore test
49-
id: cache-test
50-
uses: actions/cache/restore@v4
51-
with:
52-
key: ${{ env.BLDCACHE }}_test
53-
fail-on-cache-miss: true
54-
path: |
55-
test/
56-
57-
- name: Build CI base image
58-
run: |
59-
cd test/infra/docker-base
60-
docker build --network host -t proxysql-ci-base:latest .
61-
62-
- name: Start infrastructure
63-
run: |
64-
export WORKSPACE="${GITHUB_WORKSPACE}"
65-
export INFRA_ID="pgsql-cluster-${GITHUB_RUN_ID}"
66-
export TAP_GROUP="legacy-g3"
67-
export TEST_PY_TAP_INCL="test_cluster_sync_pgsql-t"
68-
export PROXYSQL_CLUSTER_NODES=2
69-
source test/infra/common/env.sh
70-
./test/infra/control/ensure-infras.bash
71-
72-
- name: Run test_cluster_sync_pgsql-t
73-
run: |
74-
export WORKSPACE="${GITHUB_WORKSPACE}"
75-
export INFRA_ID="pgsql-cluster-${GITHUB_RUN_ID}"
76-
export TAP_GROUP="legacy-g3"
77-
export TEST_PY_TAP_INCL="test_cluster_sync_pgsql-t"
78-
export PROXYSQL_CLUSTER_NODES=2
79-
source test/infra/common/env.sh
80-
./test/infra/control/run-tests-isolated.bash
81-
82-
- name: Cleanup
83-
if: always()
84-
run: |
85-
export WORKSPACE="${GITHUB_WORKSPACE}"
86-
export INFRA_ID="pgsql-cluster-${GITHUB_RUN_ID}"
87-
export TAP_GROUP="legacy-g3"
88-
source test/infra/common/env.sh
89-
./test/infra/control/stop-proxysql-isolated.bash || true
90-
./test/infra/control/destroy-infras.bash || true
91-
92-
- name: Archive logs
93-
if: ${{ failure() && !cancelled() }}
94-
uses: actions/upload-artifact@v4
95-
with:
96-
name: ${{ github.workflow }}-${{ env.SHA }}-logs-run${{ github.run_number }}
97-
path: |
98-
ci_infra_logs/
17+
permissions: write-all
18+
uses: sysown/proxysql/.github/workflows/ci-taptests-pgsql-cluster.yml@GH-Actions
19+
secrets: inherit
20+
with:
21+
trigger: ${{ toJson(github) }}

0 commit comments

Comments
 (0)