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 description: "Sonar Cloud access token"
50 # yamllint disable-line rule:line-length
51 group: gerrit-merge-${{ github.workflow }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
52 cancel-in-progress: true
55 TOX_ENVS: '["docs","docs-linkcheck"]'
59 runs-on: ubuntu-latest
61 - name: Notify job start
62 # yamllint disable-line rule:line-length
63 uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a # v0.6
65 host: ${{ vars.GERRIT_SERVER }}
66 username: ${{ vars.GERRIT_SSH_USER }}
67 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
68 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
69 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
70 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
73 - name: Allow replication
76 call-gerrit-tox-and-sonarcloud:
77 runs-on: ubuntu-latest
81 tox-env: ${{ fromJSON(env.TOX_ENVS) }}
83 - uses: actions/checkout@v4
85 ref: ${{ inputs.GERRIT_BRANCH }}
87 - name: Run Tox verify
88 # yamllint disable-line rule:line-length
89 uses: lfit/releng-reusable-workflows/.github/actions/tox-run-action@main
91 tox-envs: ${{ matrix.tox-env }}
92 - name: Run SonarCloud Scan
93 uses: sonarsource/sonarcloud-github-action@master
95 SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
99 -Dsonar.build.sourceEncoding=UTF-8
100 -Dsonar.organization=o-ran-sc
101 -Dsonar.projectBaseDir=.
102 -Dsonar.projectKey=o-ran-sc_com-pylog
103 -Dsonar.projectName=com-pylog
104 -Dsonar.python.coverage.reportPaths=./coverage.xm
105 -Dsonar.sources=mdclogpy
110 needs: [notify, call-gerrit-tox-and-sonarcloud]
111 runs-on: ubuntu-latest
113 - name: Get workflow conclusion
114 uses: technote-space/workflow-conclusion-action@v3
115 - name: Report workflow conclusion
116 # yamllint disable-line rule:line-length
117 uses: lfit/gerrit-review-action@7c30179c3c9389545fccb0d458df59879372ae6a # v0.6
119 host: ${{ vars.GERRIT_SERVER }}
120 username: ${{ vars.GERRIT_SSH_USER }}
121 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
122 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
123 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
124 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
125 vote-type: ${{ env.WORKFLOW_CONCLUSION }}