From: Peter Mikus Date: Thu, 18 Sep 2025 11:08:36 +0000 (+0200) Subject: feat(gha): Test X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=146bc3e1e1922ab7bae353be81b6e1188f46f02b;p=csit.git feat(gha): Test Signed-off-by: Peter Mikus Change-Id: Ic15d50af307c15b0f321ed40e1851c13f4946f9e --- diff --git a/.github/workflow/gerrit-csit-tox-verify.yml b/.github/workflow/gerrit-csit-tox-verify.yml new file mode 100644 index 0000000000..84fe01d25c --- /dev/null +++ b/.github/workflow/gerrit-csit-tox-verify.yml @@ -0,0 +1,92 @@ +name: CSIT Tox + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + inputs: + GERRIT_BRANCH: + description: "Branch that change is against" + required: true + type: string + GERRIT_CHANGE_ID: + description: "The ID for the change" + required: true + type: string + GERRIT_CHANGE_NUMBER: + description: "The Gerrit number" + required: true + type: string + GERRIT_CHANGE_URL: + description: "URL to the change" + required: true + type: string + GERRIT_EVENT_TYPE: + description: "Type of Gerrit event" + required: true + type: string + GERRIT_PATCHSET_NUMBER: + description: "The patch number for the change" + required: true + type: string + GERRIT_PATCHSET_REVISION: + description: "The revision sha" + required: true + type: string + GERRIT_PROJECT: + description: "Project in Gerrit" + required: true + type: string + GERRIT_REFSPEC: + description: "Gerrit refspec of change" + required: true + type: string + TARGET_REPO: + # yamllint disable-line rule:line-length + description: "The target GitHub repository needing the required workflow" + required: true + type: string + +concurrency: + # yamllint disable-line rule:line-length + group: required-verify-${{ github.workflow }}-${{ github.event.inputs.GERRIT_BRANCH }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }} + cancel-in-progress: true + +jobs: + tox: + name: Checkstyle on ${{ matrix.os }} ${{ matrix.executor_arch }} + runs-on: + - self-hosted + - nomad + - fdio:arch=${{ matrix.executor_arch }} + - fdio:class=builder + - fdio:namespace=${{ matrix.builder_type }} + - fdio:os=${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu2404] + executor_arch: [x86_64] + builder_type: [prod] + + steps: + # yamllint disable-line rule:line-length + - name: Gerrit Checkout + # yamllint disable-line rule:line-length + uses: lfit/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9 + with: + gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }} + gerrit-project: ${{ inputs.GERRIT_PROJECT }} + gerrit-url: ${{ vars.GERRIT_URL }} + delay: "0s" + repository: ${{ inputs.TARGET_REPO }} + ref: refs/heads/${{ inputs.GERRIT_BRANCH }} + + - name: Setup Environment + run: | + .ci/scripts/vpp/setup_executor_env.sh + + - name: Run tox + shell: bash + run: | + set -exuo pipefail + source ./resources/libraries/bash/entry/tox.sh \ No newline at end of file