|
6 | 6 | pull_request: |
7 | 7 | branches: [ "master" ] |
8 | 8 | jobs: |
9 | | - SonarCloud: |
10 | | - runs-on: windows-latest |
11 | | - steps: |
12 | | - - name: Set up JDK 11 |
13 | | - uses: actions/setup-java@v1 |
14 | | - with: |
15 | | - java-version: 1.11 |
16 | | - - uses: actions/checkout@v2 |
17 | | - with: |
18 | | - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis |
19 | | - - name: Cache SonarCloud packages |
20 | | - uses: actions/cache@v1 |
21 | | - with: |
22 | | - path: ~\sonar\cache |
23 | | - key: ${{ runner.os }}-sonar |
24 | | - restore-keys: ${{ runner.os }}-sonar |
25 | | - - name: Cache SonarCloud scanner |
26 | | - id: cache-sonar-scanner |
27 | | - uses: actions/cache@v1 |
28 | | - with: |
29 | | - path: .\.sonar\scanner |
30 | | - key: ${{ runner.os }}-sonar-scanner |
31 | | - restore-keys: ${{ runner.os }}-sonar-scanner |
32 | | - - name: Install SonarCloud scanner |
33 | | - if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' |
34 | | - shell: powershell |
35 | | - run: | |
36 | | - New-Item -Path .\.sonar\scanner -ItemType Directory |
37 | | - dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner |
38 | | - - name: Build and analyze |
39 | | - env: |
40 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any |
41 | | - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
42 | | - shell: powershell |
43 | | - run: | |
44 | | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"AchievedOwner_TDesignBlazor" /o:"playermaker" /d:sonar.login="2a3f1799901edb257281a8dc304c1617a2c02c26" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml |
45 | | - dotnet build --no-incremental |
46 | | - dotnet tool install --global dotnet-coverage |
47 | | - dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml' |
48 | | - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="2a3f1799901edb257281a8dc304c1617a2c02c26" |
| 9 | + # SonarCloud: |
| 10 | + # runs-on: windows-latest |
| 11 | + # steps: |
| 12 | + # - name: Set up JDK 11 |
| 13 | + # uses: actions/setup-java@v1 |
| 14 | + # with: |
| 15 | + # java-version: 1.11 |
| 16 | + # - uses: actions/checkout@v2 |
| 17 | + # with: |
| 18 | + # fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis |
| 19 | + # - name: Cache SonarCloud packages |
| 20 | + # uses: actions/cache@v1 |
| 21 | + # with: |
| 22 | + # path: ~\sonar\cache |
| 23 | + # key: ${{ runner.os }}-sonar |
| 24 | + # restore-keys: ${{ runner.os }}-sonar |
| 25 | + # - name: Cache SonarCloud scanner |
| 26 | + # id: cache-sonar-scanner |
| 27 | + # uses: actions/cache@v1 |
| 28 | + # with: |
| 29 | + # path: .\.sonar\scanner |
| 30 | + # key: ${{ runner.os }}-sonar-scanner |
| 31 | + # restore-keys: ${{ runner.os }}-sonar-scanner |
| 32 | + # - name: Install SonarCloud scanner |
| 33 | + # if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' |
| 34 | + # shell: powershell |
| 35 | + # run: | |
| 36 | + # New-Item -Path .\.sonar\scanner -ItemType Directory |
| 37 | + # dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner |
| 38 | + # - name: Build and analyze |
| 39 | + # env: |
| 40 | + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any |
| 41 | + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
| 42 | + # shell: powershell |
| 43 | + # run: | |
| 44 | + # .\.sonar\scanner\dotnet-sonarscanner begin /k:"AchievedOwner_TDesignBlazor" /o:"playermaker" /d:sonar.login="2a3f1799901edb257281a8dc304c1617a2c02c26" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml |
| 45 | + # dotnet build --no-incremental |
| 46 | + # dotnet tool install --global dotnet-coverage |
| 47 | + # dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml' |
| 48 | + # .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="2a3f1799901edb257281a8dc304c1617a2c02c26" |
49 | 49 |
|
50 | 50 | Codacy: |
51 | 51 | runs-on: ubuntu-latest |
|
0 commit comments