Skip to content

feat: add writing secrets feature in terraform provider #67

feat: add writing secrets feature in terraform provider

feat: add writing secrets feature in terraform provider #67

Workflow file for this run

name: SonarQube
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
on:
pull_request_target:
types: [opened, synchronize]
workflow_dispatch:
permissions:
contents: write
jobs:
sonarqube:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- name: Run unit tests
run: |
cd api/client
go test -race -coverprofile=coverage.out -v
ls -alt
go tool cover -func="coverage.out"
- name: SonarQube Scan on PR
if: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' }}
uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: .
args: >
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.pullrequest.key=${{ github.event.number }}
-Dsonar.pullrequest.branch=${{ github.head_ref }}
-Dsonar.pullrequest.base=${{ github.base_ref }}
-Dsonar.exclusions=provider/**,main.go,api/client/client_test.go
-Dsonar.go.coverage.reportPaths=api/client/coverage.out
env:
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonar.dev.beyondtrust.com
- name: SonarQube Scan on branch
if: ${{ github.actor != 'dependabot[bot]' && github.event_name != 'pull_request' }}
uses: sonarsource/sonarqube-scan-action@master
with:
projectBaseDir: .
args: >
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.exclusions=provider/**,main.go,api/client/client_test.go
-Dsonar.go.coverage.reportPaths=coverage.out
env:
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonar.dev.beyondtrust.com
- name: SonarQube Quality Gate check
if: ${{ github.actor != 'dependabot[bot]' && inputs.quality_gate_check }}
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}