From 5a80c9b99cc5dbdf61182212153b3b8e1789ca21 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Wed, 1 Nov 2023 18:42:49 +0100 Subject: [PATCH] ci: add missing runs-on --- .gitea/workflows/server.yaml | 81 ++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 40 deletions(-) diff --git a/.gitea/workflows/server.yaml b/.gitea/workflows/server.yaml index 58144d6..30c7790 100644 --- a/.gitea/workflows/server.yaml +++ b/.gitea/workflows/server.yaml @@ -4,51 +4,52 @@ on: [ push ] jobs: build-server: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup dotnet - uses: https://github.com/actions/setup-dotnet@v3 - with: - dotnet-version: 7.0 - run: | - dotnet build Continuity -c Release -# dotnet test Continuity.Tests -c Release - export SONAR_TOKEN=${{secrets.SONAR_TOKEN}} - export SONAR_PROJECT_KEY=${{secrets.SONAR_PROJECT_KEY}} - export SONAR_HOST_URL=${{secrets.SONAR_HOST_URL}} - export IS_LOCAL_BUILD=${{secrets.IS_LOCAL_BUILD}} - export SUPPORTS_DOCKER=${{secrets.SUPPORTS_DOCKER}} - apt-get update - apt-get install --yes openjdk-11-jre - chmod +x ./build.sh - ./build.sh --verbose --root . + - uses: actions/checkout@v3 + - name: Setup dotnet + uses: https://github.com/actions/setup-dotnet@v3 + with: + dotnet-version: 7.0 + run: | + dotnet build Continuity -c Release + # dotnet test Continuity.Tests -c Release + export SONAR_TOKEN=${{secrets.SONAR_TOKEN}} + export SONAR_PROJECT_KEY=${{secrets.SONAR_PROJECT_KEY}} + export SONAR_HOST_URL=${{secrets.SONAR_HOST_URL}} + export IS_LOCAL_BUILD=${{secrets.IS_LOCAL_BUILD}} + export SUPPORTS_DOCKER=${{secrets.SUPPORTS_DOCKER}} + apt-get update + apt-get install --yes openjdk-11-jre + chmod +x ./build.sh + ./build.sh --verbose --root . sonarqube: needs: build-server runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Setup dotnet - uses: https://github.com/actions/setup-dotnet@v3 - with: - dotnet-version: 7.0 - - name: Install dependencies - run: dotnet restore - - name: Setup Sonarqube Dependencies - run: | - apt-get update - apt-get install --yes openjdk-11-jre - dotnet tool install --global dotnet-sonarscanner - dotnet tool install --global dotnet-coverage - export PATH="$PATH:$HOME/.dotnet/tools" - - name: Sonarqube Begin - run: | - dotnet sonarscanner begin /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" + - uses: actions/checkout@v3 + - name: Setup dotnet + uses: https://github.com/actions/setup-dotnet@v3 + with: + dotnet-version: 7.0 + - name: Install dependencies + run: dotnet restore + - name: Setup Sonarqube Dependencies + run: | + apt-get update + apt-get install --yes openjdk-11-jre + dotnet tool install --global dotnet-sonarscanner + dotnet tool install --global dotnet-coverage + export PATH="$PATH:$HOME/.dotnet/tools" + - name: Sonarqube Begin + run: | + dotnet sonarscanner begin /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" - - name: Sonarqube Scan - run: | + - name: Sonarqube Scan + run: | dotnet build -# dotnet test --collect "Code Coverage" --logger trx --results-directory "TestsResults" -# dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml' - - name: Sonarqube End - run: | + # dotnet test --collect "Code Coverage" --logger trx --results-directory "TestsResults" + # dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml' + - name: Sonarqube End + run: | dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"