From 412f7d2f86ac163570833504ea377ca183817de0 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Sat, 11 Apr 2026 03:43:27 +0000 Subject: [PATCH] ci: add dedicated reusable workflows for legacy-g{1,3,5}, mysql84-g{1..5}, unit-tests Adds 9 per-group reusable workflows modeled on ci-legacy-g4.yml, which together with the existing ci-legacy-g2/g2-genai/g4/clickhouse-g1 cover all the CI-legacy-* and CI-mysql84-* callers that currently live on v3.0. Previously those callers routed to the generic ci-taptests-groups.yml, whose tests job sources its matrix from a cached proxysql/tap-matrix.json that recent CI-builds runs populate as "[ ]". With an empty matrix vector GitHub rejects the strategy ("Matrix vector 'testgroup' does not contain any values") and the tests job never instantiates - see run 24240099115 for an example. Each new reusable: - drives tests via TAP_GROUP + INFRA_ID, delegating infra resolution to test/infra/control/ensure-infras.bash (which looks up the per-group env.sh / infras.lst under test/tap/groups/) - keeps SKIP_CLUSTER_START=1 (safe default - only the pgsql cluster sync workflow needs the cluster started) - drops TAP_USE_NOISE=1 (g4-specific; leave other groups to opt in) ci-unittests.yml is slimmed down (no docker base build, no ensure/destroy) because the unit-tests group sets SKIP_PROXYSQL=1, which makes run-tests-isolated.bash take its host-only branch and execute the 42 *_unit-t binaries discovered from groups.json directly on the runner. --- .github/workflows/ci-legacy-g1.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-legacy-g3.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-legacy-g5.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-mysql84-g1.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-mysql84-g2.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-mysql84-g3.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-mysql84-g4.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-mysql84-g5.yml | 119 ++++++++++++++++++++++++++++ .github/workflows/ci-unittests.yml | 90 +++++++++++++++++++++ 9 files changed, 1042 insertions(+) create mode 100644 .github/workflows/ci-legacy-g1.yml create mode 100644 .github/workflows/ci-legacy-g3.yml create mode 100644 .github/workflows/ci-legacy-g5.yml create mode 100644 .github/workflows/ci-mysql84-g1.yml create mode 100644 .github/workflows/ci-mysql84-g2.yml create mode 100644 .github/workflows/ci-mysql84-g3.yml create mode 100644 .github/workflows/ci-mysql84-g4.yml create mode 100644 .github/workflows/ci-mysql84-g5.yml create mode 100644 .github/workflows/ci-unittests.yml diff --git a/.github/workflows/ci-legacy-g1.yml b/.github/workflows/ci-legacy-g1.yml new file mode 100644 index 000000000..046d8f647 --- /dev/null +++ b/.github/workflows/ci-legacy-g1.yml @@ -0,0 +1,119 @@ +name: CI-legacy-g1 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-legacy-g1" + export TAP_GROUP="legacy-g1" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run legacy-g1 tests + run: | + cd proxysql + export INFRA_ID="ci-legacy-g1" + export TAP_GROUP="legacy-g1" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-legacy-g1" + export TAP_GROUP="legacy-g1" + docker logs proxysql.ci-legacy-g1 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-legacy-g3.yml b/.github/workflows/ci-legacy-g3.yml new file mode 100644 index 000000000..c28f2fc5b --- /dev/null +++ b/.github/workflows/ci-legacy-g3.yml @@ -0,0 +1,119 @@ +name: CI-legacy-g3 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-legacy-g3" + export TAP_GROUP="legacy-g3" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run legacy-g3 tests + run: | + cd proxysql + export INFRA_ID="ci-legacy-g3" + export TAP_GROUP="legacy-g3" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-legacy-g3" + export TAP_GROUP="legacy-g3" + docker logs proxysql.ci-legacy-g3 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-legacy-g5.yml b/.github/workflows/ci-legacy-g5.yml new file mode 100644 index 000000000..776dd3052 --- /dev/null +++ b/.github/workflows/ci-legacy-g5.yml @@ -0,0 +1,119 @@ +name: CI-legacy-g5 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-legacy-g5" + export TAP_GROUP="legacy-g5" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run legacy-g5 tests + run: | + cd proxysql + export INFRA_ID="ci-legacy-g5" + export TAP_GROUP="legacy-g5" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-legacy-g5" + export TAP_GROUP="legacy-g5" + docker logs proxysql.ci-legacy-g5 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-mysql84-g1.yml b/.github/workflows/ci-mysql84-g1.yml new file mode 100644 index 000000000..123bb6f49 --- /dev/null +++ b/.github/workflows/ci-mysql84-g1.yml @@ -0,0 +1,119 @@ +name: CI-mysql84-g1 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g1" + export TAP_GROUP="mysql84-g1" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run mysql84-g1 tests + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g1" + export TAP_GROUP="mysql84-g1" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-mysql84-g1" + export TAP_GROUP="mysql84-g1" + docker logs proxysql.ci-mysql84-g1 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-mysql84-g2.yml b/.github/workflows/ci-mysql84-g2.yml new file mode 100644 index 000000000..18d9e205b --- /dev/null +++ b/.github/workflows/ci-mysql84-g2.yml @@ -0,0 +1,119 @@ +name: CI-mysql84-g2 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g2" + export TAP_GROUP="mysql84-g2" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run mysql84-g2 tests + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g2" + export TAP_GROUP="mysql84-g2" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-mysql84-g2" + export TAP_GROUP="mysql84-g2" + docker logs proxysql.ci-mysql84-g2 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-mysql84-g3.yml b/.github/workflows/ci-mysql84-g3.yml new file mode 100644 index 000000000..f35029485 --- /dev/null +++ b/.github/workflows/ci-mysql84-g3.yml @@ -0,0 +1,119 @@ +name: CI-mysql84-g3 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g3" + export TAP_GROUP="mysql84-g3" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run mysql84-g3 tests + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g3" + export TAP_GROUP="mysql84-g3" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-mysql84-g3" + export TAP_GROUP="mysql84-g3" + docker logs proxysql.ci-mysql84-g3 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-mysql84-g4.yml b/.github/workflows/ci-mysql84-g4.yml new file mode 100644 index 000000000..88403b82f --- /dev/null +++ b/.github/workflows/ci-mysql84-g4.yml @@ -0,0 +1,119 @@ +name: CI-mysql84-g4 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g4" + export TAP_GROUP="mysql84-g4" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run mysql84-g4 tests + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g4" + export TAP_GROUP="mysql84-g4" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-mysql84-g4" + export TAP_GROUP="mysql84-g4" + docker logs proxysql.ci-mysql84-g4 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-mysql84-g5.yml b/.github/workflows/ci-mysql84-g5.yml new file mode 100644 index 000000000..e8b8d759a --- /dev/null +++ b/.github/workflows/ci-mysql84-g5.yml @@ -0,0 +1,119 @@ +name: CI-mysql84-g5 + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + infradb: [ 'mysql57' ] + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(${{ matrix.infradb }})' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Build CI base image + run: | + cd proxysql/test/infra/docker-base + docker build -t proxysql-ci-base:latest . + + - name: Start infrastructure + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g5" + export TAP_GROUP="mysql84-g5" + export SKIP_CLUSTER_START=1 + test/infra/control/ensure-infras.bash + + - name: Run mysql84-g5 tests + run: | + cd proxysql + export INFRA_ID="ci-mysql84-g5" + export TAP_GROUP="mysql84-g5" + export SKIP_CLUSTER_START=1 + test/infra/control/run-tests-isolated.bash + + - name: Cleanup + if: always() + run: | + set +e + cd proxysql + export INFRA_ID="ci-mysql84-g5" + export TAP_GROUP="mysql84-g5" + docker logs proxysql.ci-mysql84-g5 2>&1 | tail -50 || true + test/infra/control/stop-proxysql-isolated.bash + test/infra/control/destroy-infras.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml new file mode 100644 index 000000000..0cf5a2469 --- /dev/null +++ b/.github/workflows/ci-unittests.yml @@ -0,0 +1,90 @@ +name: CI-unittests + +on: + workflow_dispatch: + workflow_call: + inputs: + trigger: + type: string + +env: + SHA: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }} + +jobs: + tests: + runs-on: ubuntu-22.04 + env: + BLDCACHE: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_src + MATRIX: '(unit-tests-g1)' + + steps: + + - uses: LouisBrunner/checks-action@v2.0.0 + id: checks + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: '${{ github.workflow }} / ${{ github.job }} ${{ env.MATRIX }}' + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + status: 'in_progress' + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + + - name: Checkout repository + uses: actions/checkout@v4 + with: + repository: ${{ github.repository }} + ref: ${{ env.SHA }} + path: 'proxysql' + sparse-checkout: | + test/infra/control + test/tap/groups + test/scripts + + - name: Cache restore src + id: cache-src + uses: actions/cache/restore@v4 + with: + key: ${{ env.BLDCACHE }} + fail-on-cache-miss: true + path: | + proxysql/src/ + + - name: Cache restore test + id: cache-test + uses: actions/cache/restore@v4 + with: + key: ${{ inputs.trigger && fromJson(inputs.trigger).event.workflow_run.head_sha || github.sha }}_ubuntu22-tap_test + fail-on-cache-miss: true + path: | + proxysql/test/ + + - name: Verify binary + run: | + chmod +x proxysql/src/proxysql + file proxysql/src/proxysql + + - name: Run unit-tests-g1 + run: | + cd proxysql + export INFRA_ID="ci-unittests" + export TAP_GROUP="unit-tests-g1" + test/infra/control/run-tests-isolated.bash + + - name: Archive artifacts logs + if: ${{ failure() && !cancelled() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ github.workflow }}-${{ env.SHA }}-logs-run#${{ github.run_number }} + path: | + proxysql/ci_*_logs/ + + - uses: LouisBrunner/checks-action@v2.0.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + check_id: ${{ steps.checks.outputs.check_id }} + repo: ${{ github.repository }} + sha: ${{ env.SHA }} + conclusion: ${{ job.status }} + details_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'