mirror of
https://github.com/outbackdingo/cluster-api-provider-proxmox.git
synced 2026-01-27 10:18:38 +00:00
Bumps [SonarSource/sonarqube-scan-action](https://github.com/sonarsource/sonarqube-scan-action) from 5 to 6. - [Release notes](https://github.com/sonarsource/sonarqube-scan-action/releases) - [Commits](https://github.com/sonarsource/sonarqube-scan-action/compare/v5...v6) --- updated-dependencies: - dependency-name: SonarSource/sonarqube-scan-action dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
name: Test
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request_target:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
confirm:
|
|
# check if confirmation is necessary
|
|
if: github.event_name == 'pull_request_target'
|
|
# request confirmation
|
|
environment: e2e
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: ":"
|
|
|
|
test:
|
|
# check the result of confirmation if necessary
|
|
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-not-requiring-successful-dependent-jobs
|
|
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#always
|
|
if: ${{ !cancelled() }}
|
|
needs: [confirm]
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: checkout PR ${{ github.event.pull_request.number }}
|
|
if: github.event_name == 'pull_request_target'
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # for SonarQube
|
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: checkout
|
|
if: github.event_name == 'push'
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # for SonarQube
|
|
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- run: "make verify"
|
|
- run: "make test"
|
|
|
|
- name: SonarQube for PR ${{ github.event.pull_request.number }}
|
|
if: github.event_name == 'pull_request_target'
|
|
uses: SonarSource/sonarqube-scan-action@v6
|
|
with:
|
|
args: >
|
|
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
|
|
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
|
|
- name: SonarQube
|
|
if: github.event_name == 'push'
|
|
uses: SonarSource/sonarqube-scan-action@v6
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|