Skip to content
Merged
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
29 changes: 3 additions & 26 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ on:
types: [opened, synchronize, reopened]

jobs:
validate:
name: 'Validate'
build-and-test:
name: 'Build & Test'
runs-on: ubuntu-24.04
env:
RUN_SONARQUBE_ANALYSIS: ${{ secrets.SONAR_TOKEN != '' }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -30,31 +28,14 @@ jobs:
id: 'setup-chrome'
- name: 'Set CHROME_BIN environment variable'
run: 'echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV'
- name: 'Extract turnierplan.NET version'
shell: pwsh
run: |
$VersionXmlContent = Get-Content -Path "version.xml" -Raw
$Version = [regex]::Match($VersionXmlContent, '<Version>(\d+\.\d+\.\d+)</Version>').Groups[1].Value
Write-Host $Version
Add-Content -Path $env:GITHUB_ENV -Value "TURNIERPLAN_APPLICATION_VERSION=$Version"
working-directory: './src'
- name: Install SonarQube Cloud scanner
if: ${{ env.RUN_SONARQUBE_ANALYSIS == 'true' }}
run: 'dotnet tool install --global dotnet-sonarscanner'
- name: Begin SonarQube Cloud analysis
if: ${{ env.RUN_SONARQUBE_ANALYSIS == 'true' }}
run: 'dotnet-sonarscanner begin /k:"turnierplan-NET_turnierplan.NET" /o:"turnierplan-net" /v:"${{ env.TURNIERPLAN_APPLICATION_VERSION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" /d:sonar.javascript.lcov.reportPaths="**/lcov.info" /d:sonar.coverage.exclusions="**/*.spec.ts,**/*.cy.js" /d:sonar.exclusions="Turnierplan.Dal/Migrations/*"'
working-directory: './src'
- name: 'Restore .NET solution'
run: 'dotnet restore'
working-directory: './src'
- name: 'Build .NET solution'
run: 'dotnet build --no-restore -c Release'
working-directory: './src'
- name: 'Install dotnet-coverage'
run: 'dotnet tool install --global dotnet-coverage'
- name: 'Test .NET solution'
run: 'dotnet-coverage collect "dotnet test --no-build -c Release" -f xml -o "coverage.xml"'
run: 'dotnet test --no-build -c Release'
working-directory: './src'
- name: 'Install npm packages'
run: 'npm ci'
Expand All @@ -68,10 +49,6 @@ jobs:
- name: 'Test client application'
run: 'npm run test:ci'
working-directory: './src/Turnierplan.App/Client/'
- name: End SonarQube Cloud analysis
if: ${{ env.RUN_SONARQUBE_ANALYSIS == 'true' }}
run: 'dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"'
working-directory: './src'

e2e-amd64:
name: 'E2E Tests (amd64)'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

*An open-source tournament planning application for football clubs*

[![Build Status](https://github.com/turnierplan-NET/turnierplan.NET/actions/workflows/validate.yaml/badge.svg)](https://github.com/turnierplan-NET/turnierplan.NET/actions/workflows/validate.yaml) [![License](https://img.shields.io/github/license/turnierplan-NET/turnierplan.NET?color=blue)](./LICENSE) [![NuGet](https://img.shields.io/nuget/v/Turnierplan.Adapter)](https://www.nuget.org/packages/Turnierplan.Adapter) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=turnierplan-NET_turnierplan.NET&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=turnierplan-NET_turnierplan.NET) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=turnierplan-NET_turnierplan.NET&metric=coverage)](https://sonarcloud.io/summary/new_code?id=turnierplan-NET_turnierplan.NET)
[![Build Status](https://github.com/turnierplan-NET/turnierplan.NET/actions/workflows/validate.yaml/badge.svg)](https://github.com/turnierplan-NET/turnierplan.NET/actions/workflows/validate.yaml) [![License](https://img.shields.io/github/license/turnierplan-NET/turnierplan.NET?color=blue)](./LICENSE) [![NuGet](https://img.shields.io/nuget/v/Turnierplan.Adapter)](https://www.nuget.org/packages/Turnierplan.Adapter)

## Introduction

Expand Down
Loading