version update (#6) #7
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: .NET | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore *.sln | |
- name: Instal sonarscanner | |
run: dotnet tool install --global dotnet-sonarscanner | |
- name: Sonarscanner begin | |
run: dotnet sonarscanner begin /o:"${{ secrets.SONAR_ORGANIZATION }}" /k:"${{ secrets.SONAR_PROJECT_KEY }}" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | |
- name: Build | |
run: dotnet build *.sln --no-restore --configuration Release | |
- name: Run tests | |
run: dotnet test */TestProject.csproj --configuration Release | |
- name: Sonarscanner end | |
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" |