Skip to content
Merged
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
66 changes: 66 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
validate:
name: 'Validate'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Setup .NET SDK 9.x'
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
- name: 'Setup Node.js 22.x'
uses: actions/setup-node@v3
with:
node-version: '22.x'
- name: 'Setup Chrome'
uses: browser-actions/setup-chrome@v1
id: 'setup-chrome'
- name: 'Set CHROME_BIN environment variable'
run: 'echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV'
- name: Install SonarQube Cloud scanner
run: 'dotnet tool install --global dotnet-sonarscanner'
- name: Start SonarQube Cloud analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: 'dotnet-sonarscanner begin /k:"turnierplan-NET_turnierplan.NET" /o:"turnierplan-net" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" /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"'
working-directory: './src'
- name: 'Install npm packages'
run: 'npm ci'
working-directory: './src/Turnierplan.App/Client/'
- name: 'Build client application'
run: 'npm run build:prod'
working-directory: './src/Turnierplan.App/Client/'
- name: 'Lint client application'
run: 'npm run lint:ci'
working-directory: './src/Turnierplan.App/Client/'
- name: 'Test client application'
run: 'npm run test:ci'
working-directory: './src/Turnierplan.App/Client/'
- name: End SonarQube Cloud analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: 'dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"'
working-directory: './src'
- name: 'Publish .NET solution'
run: 'dotnet publish --no-build -c Release /p:UseAppHost=false'
working-directory: './src'
Loading