Skip to content

Commit

Permalink
updating SQ
Browse files Browse the repository at this point in the history
  • Loading branch information
brianLoomis committed Feb 2, 2024
1 parent 4e99046 commit 5d2c8f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: SonarQube scan

# place this file in <root folder>/.github/workflows
on:
# Trigger analysis when pushing to your main branches, and when creating a pull request.
push:
branches:
- main
Expand All @@ -12,18 +11,21 @@ on:

jobs:
sonarqube:
runs-on: ip-range-controlled
# runs-on: ubuntu-latest for GH runner
# needs: [build]
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0

- name: Generate coverage.out and covreport.xml file
run: go test -v -coverprofile="coverage.out" ./...
- name: Copy file
run: cp coverage.out test/unittest/coverage.out
- name: cat the file
run: cat test/unittest/coverage.out

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}


SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# must be unique in a given SonarQube instance
sonar.projectKey=habitat-sh_arch-sample-job_AYZMKAdluSRY2YBi6dj1
sonar.projectKey=chef_arch-sample-cli_AYYEmWi1uSRY2YBi6bnQ

# --- optional properties ---

Expand Down

0 comments on commit 5d2c8f6

Please sign in to comment.