Skip to content

Commit

Permalink
Update push-action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsIgov committed Feb 2, 2024
1 parent 5bdd04b commit 856f9f4
Showing 1 changed file with 20 additions and 24 deletions.
44 changes: 20 additions & 24 deletions .github/workflows/push-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,27 @@ jobs:
runs-on: ubuntu-latest
env:
sonar_project_key: Byteology_typed-http-clients
sonar_project_name: typed-http-clients
sonar_organization: byteology
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Checkout
uses: actions/checkout@v2

- name: Sonarqube Begin
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /o:byteology /k:${sonar_project_key} /d:sonar.login=${{ secrets.SONAR_TOKEN }} /s:$GITHUB_WORKSPACE/.sonar/SonarQube.Analysis.xml
- name: Restore
run: dotnet restore
uses: actions/checkout@v4

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal --settings ./.sonar/coverlet.runsettings --logger:trx

- name: Sonarqube End
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: SonarScanner for .NET 6
uses: highbyte/[email protected]
with:
# The key of the SonarQube project
sonarProjectKey: ${sonar_project_key}
# The name of the SonarQube project
sonarProjectName: ${sonar_project_name}
# The name of the SonarQube organization in SonarCloud. For hosted SonarQube, skip this setting.
sonarOrganization: ${sonar_organization}
# Optional command arguments to dotnet build
dotnetBuildArguments: --configuration Release
# Optional command arguments to dotnet test
dotnetTestArguments: --no-build --configuration Release --verbosity normal --settings ./.sonar/coverlet.runsettings --logger:trx
# Optional extra command arguments the the SonarScanner 'begin' command
sonarBeginArguments: /s:$GITHUB_WORKSPACE/.sonar/SonarQube.Analysis.xml

0 comments on commit 856f9f4

Please sign in to comment.