Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed without completing; details component troubleshooting #506

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 65 additions & 63 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,68 @@
name: Static code analysis
on:
pull_request:
branches:
- main
- next
jobs:
code-analysis:
name: Static code analysis
on:
pull_request:
branches:
- main
- next
jobs:
code-analysis:
name: Static code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu' # Alternative distribution options are available.

- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v3
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarCloud coverage
id: cache-sonar-coverage
uses: actions/cache@v3
with:
path: ~\sonar\cache
key: ${{ runner.os }}-coverage
restore-keys: ${{ runner.os }}-coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install SonarCloud scanners
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
run: dotnet tool install --global dotnet-sonarscanner

- name: Install SonarCloud coverage
if: steps.cache-sonar-coverage.outputs.cache-hit != 'true'
run: dotnet tool install --global dotnet-coverage
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: "zulu" # Alternative distribution options are available.

- name: Build, Test and Analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
dotnet-sonarscanner begin \
/k:"DFE-Digital_childrens-social-care-cpd" \
/o:"dfe-digital" \
/d:sonar.qualitygate.wait=true \
/d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \
/d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*" \
/d:sonar.test.exclusions="Childrens-Social-Care-CPD-Tests/**/*" \
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.host.url="https://sonarcloud.io"
dotnet build --no-incremental
dotnet-coverage collect --settings dotnet-cover-config.xml -f xml -o coverage.xml "dotnet test"
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v3
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarCloud coverage
id: cache-sonar-coverage
uses: actions/cache@v3
with:
path: ~\sonar\cache
key: ${{ runner.os }}-coverage
restore-keys: ${{ runner.os }}-coverage

- name: Install SonarCloud scanners
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
run: dotnet tool install --global dotnet-sonarscanner

- name: Install SonarCloud coverage
if: steps.cache-sonar-coverage.outputs.cache-hit != 'true'
run: dotnet tool install --global dotnet-coverage

- name: Build, Test and Analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
dotnet-sonarscanner begin \
/k:"DFE-Digital_childrens-social-care-cpd" \
/o:"dfe-digital" \
/d:sonar.qualitygate.wait=true \
/d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \
/d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*" \
/d:sonar.test.exclusions="Childrens-Social-Care-CPD-Tests/**/*" \
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.host.url="https://sonarcloud.io"
dotnet build --no-incremental
dotnet-coverage collect --settings dotnet-cover-config.xml -f xml -o coverage.xml "dotnet test"
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using FluentAssertions;
using NUnit.Framework;
using System;

// Here is a comment
namespace Childrens_Social_Care_CPD_Tests.Contentful;

[TestFixture]
Expand Down
Loading