Skip to content

csit-verify-tox

csit-verify-tox #239

---
name: csit-verify-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
permissions:
contents: read
jobs:
notify-start:
runs-on: ubuntu-latest
steps:
- name: Notify workflow start
uses: lfit/gerrit-review-action@v0.9
with:
host: ${{ vars.GERRIT_SERVER }}
username: ${{ vars.GERRIT_SSH_REQUIRED_USER }}
key: ${{ secrets.GERRIT_SSH_REQUIRED_PRIVKEY }}
known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
gerrit-change-number: ${{ github.event.inputs.GERRIT_CHANGE_NUMBER }}
gerrit-patchset-number: ${{ github.event.inputs.GERRIT_PATCHSET_NUMBER }}
vote-type: clear
comment-only: true
csit-verify-tox:
name: csit-verify-tox
runs-on:
- self-hosted
- nomad
- fdio:arch=${{ matrix.executor_arch }}
- fdio:class=builder
- fdio:size=csit
- fdio:namespace=prod
- fdio:os=${{ matrix.os }}
strategy:
matrix:
os: [ubuntu2404]
executor_arch: [x86_64]
env:
JOB_NAME: ${{ github.job }}
steps:
- name: Gerrit Checkout
# yamllint disable-line rule:line-length
uses: lfit/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9
with:
gerrit-refspec: ${{ github.event.inputs.GERRIT_REFSPEC }}
gerrit-project: ${{ github.event.inputs.GERRIT_PROJECT }}
gerrit-url: ${{ vars.GERRIT_URL }}
delay: "10s"
ref: refs/heads/${{ github.event.inputs.GERRIT_BRANCH }}
- name: Setup Environment
# yamllint disable-line rule:line-length
uses: fdio/.github/.github/actions/setup-executor-env@b728d1589228e2891a4241a1bba362d76895c225
- name: Run CSIT Bootstrap
# yamllint disable-line rule:line-length
uses: fdio/csit/.github/actions/csit-bootstrap@a372372ca8f89676c55631f8650468dfab86cc2a
with:
bootstrap_script: tox.sh
with_oper: false
- name: Archive Logs
if: ${{ always() }}
uses: actions/upload-artifact@v6
with:
name: ${{ github.job }}-${{ github.run_number }}
path: archives/
if-no-files-found: ignore
vote:
if: ${{ always() }}
needs:
- notify-start
- csit-verify-tox
runs-on: ubuntu-latest
steps:
- uses: technote-space/workflow-conclusion-action@v3
- name: Set vote
uses: lfit/gerrit-review-action@v0.9
with:
host: ${{ vars.GERRIT_SERVER }}
username: ${{ vars.GERRIT_SSH_REQUIRED_USER }}
key: ${{ secrets.GERRIT_SSH_REQUIRED_PRIVKEY }}
known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
gerrit-change-number: ${{ github.event.inputs.GERRIT_CHANGE_NUMBER }}
gerrit-patchset-number: ${{ github.event.inputs.GERRIT_PATCHSET_NUMBER }}
vote-type: ${{ env.WORKFLOW_CONCLUSION }}
comment-only: true