4 # yamllint disable-line rule:truthy
9 description: "Branch that change is against"
13 description: "The ID for the change"
17 description: "The Gerrit number"
21 description: "URL to the change"
25 description: "Type of Gerrit event"
28 GERRIT_PATCHSET_NUMBER:
29 description: "The patch number for the change"
32 GERRIT_PATCHSET_REVISION:
33 description: "The revision sha"
37 description: "Project in Gerrit"
41 description: "Gerrit refspec of change"
46 group: ${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
47 cancel-in-progress: true
51 runs-on: ubuntu-latest
54 uses: lfit/gerrit-review-action@v0.3
56 host: ${{ vars.LFIT_GERRIT_SERVER }}
57 username: ${{ vars.LFIT_GERRIT_SSH_USER }}
58 key: ${{ secrets.LFIT_GERRIT_SSH_PRIVKEY_NP }}
59 known_hosts: ${{ vars.LFIT_GERRIT_KNOWN_HOSTS }}
60 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
61 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
63 - name: Allow replication
66 # run pre-commit tox env separately to get use of more parallel processing
69 runs-on: ubuntu-latest
71 - uses: lfit/checkout-gerrit-change-action@v0.2
73 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
75 - uses: actions/setup-python@v4
77 python-version: "3.11"
78 - name: Run static analysis and format checkers
79 run: pipx run tox -e pre-commit
83 runs-on: ubuntu-latest
85 - uses: lfit/checkout-gerrit-change-action@v0.2
87 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
89 - uses: actions/setup-python@v4
92 python-version: "3.11"
95 TOX_SKIP_ENV=pre-commit pipx run tox
99 needs: [prepare, pre-commit, tox]
100 runs-on: ubuntu-latest
102 - uses: technote-space/workflow-conclusion-action@v3
104 uses: lfit/gerrit-review-action@v0.3
106 host: ${{ vars.LFIT_GERRIT_SERVER }}
107 username: ${{ vars.LFIT_GERRIT_SSH_USER }}
108 key: ${{ secrets.LFIT_GERRIT_SSH_PRIVKEY_NP }}
109 known_hosts: ${{ vars.LFIT_GERRIT_KNOWN_HOSTS }}
110 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
111 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
112 vote-type: ${{ env.WORKFLOW_CONCLUSION }}