Skip to content

feat(observability): add Seq logging sink and OpenTelemetry tracing #61

feat(observability): add Seq logging sink and OpenTelemetry tracing

feat(observability): add Seq logging sink and OpenTelemetry tracing #61

Workflow file for this run

name: SonarCloud

Check failure on line 1 in .github/workflows/sonarcloud.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sonarcloud.yml

Invalid workflow file

(Line: 18, Col: 9): Unrecognized named-value: 'env'. Located at position 1 within expression: env.SONAR_TOKEN_PRESENT == 'true' || github.event_name == 'workflow_dispatch'
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
sonarcloud:
name: SonarCloud Scan
runs-on: ubuntu-latest
if: ${{ env.SONAR_TOKEN_PRESENT == 'true' || github.event_name == 'workflow_dispatch' }}
env:
SONAR_TOKEN_PRESENT: ${{ secrets.SONAR_TOKEN != '' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Install SonarScanner
run: dotnet tool install --global dotnet-sonarscanner
- name: Begin SonarCloud
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet sonarscanner begin /k:"cce-knowledge-center" /o:"ministry-of-energy" \
/d:sonar.token="$SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io"
- name: Build + test
run: |
dotnet build backend/CCE.sln --nologo -c Debug
dotnet test backend/CCE.sln --no-build --nologo --collect:"XPlat Code Coverage"
- name: End SonarCloud
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"