update hubspot (#12) #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
# Triggers the workflow on push or pull request events | |
on: [push] | |
jobs: | |
# Label of the container job | |
test_platform: | |
# Containers must run in Linux based operating systems | |
runs-on: ubuntu-latest | |
env: | |
BUILD_CONFIGURATION: Release | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.x.x | |
- name: Sonarqube Begin | |
if: github.ref == 'refs/heads/production' | |
run: | | |
dotnet tool install --global dotnet-sonarscanner | |
dotnet sonarscanner begin /o:boomandbucket /k:hubspot_net /v:$GITHUB_RUN_NUMBER /d:sonar.login=${{ secrets.SONAR_TOKEN }} /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml | |
- name: Sonarqube Begin | |
if: github.ref != 'refs/heads/production' | |
run: | | |
dotnet tool install --global dotnet-sonarscanner | |
dotnet sonarscanner begin /o:boomandbucket /k:hubspot_net /d:sonar.login=${{ secrets.SONAR_TOKEN }} /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml | |
- name: Test | |
run: dotnet test ./HubSpot.NETCore.sln --verbosity normal -r ./test-results --logger "GitHubActions;" --logger "trx;LogFilePath=./TestResults/test_result.trx" --collect:"XPlat Code Coverage" --settings $GITHUB_WORKSPACE/coverlet.runsettings | |
- name: Sonarqube end | |
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |