ci: add missing runs-on
This commit is contained in:
parent
a7fddf6c02
commit
5a80c9b99c
1 changed files with 41 additions and 40 deletions
|
@ -4,51 +4,52 @@ on: [ push ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-server:
|
build-server:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: https://github.com/actions/setup-dotnet@v3
|
uses: https://github.com/actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 7.0
|
dotnet-version: 7.0
|
||||||
run: |
|
run: |
|
||||||
dotnet build Continuity -c Release
|
dotnet build Continuity -c Release
|
||||||
# dotnet test Continuity.Tests -c Release
|
# dotnet test Continuity.Tests -c Release
|
||||||
export SONAR_TOKEN=${{secrets.SONAR_TOKEN}}
|
export SONAR_TOKEN=${{secrets.SONAR_TOKEN}}
|
||||||
export SONAR_PROJECT_KEY=${{secrets.SONAR_PROJECT_KEY}}
|
export SONAR_PROJECT_KEY=${{secrets.SONAR_PROJECT_KEY}}
|
||||||
export SONAR_HOST_URL=${{secrets.SONAR_HOST_URL}}
|
export SONAR_HOST_URL=${{secrets.SONAR_HOST_URL}}
|
||||||
export IS_LOCAL_BUILD=${{secrets.IS_LOCAL_BUILD}}
|
export IS_LOCAL_BUILD=${{secrets.IS_LOCAL_BUILD}}
|
||||||
export SUPPORTS_DOCKER=${{secrets.SUPPORTS_DOCKER}}
|
export SUPPORTS_DOCKER=${{secrets.SUPPORTS_DOCKER}}
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install --yes openjdk-11-jre
|
apt-get install --yes openjdk-11-jre
|
||||||
chmod +x ./build.sh
|
chmod +x ./build.sh
|
||||||
./build.sh --verbose --root .
|
./build.sh --verbose --root .
|
||||||
sonarqube:
|
sonarqube:
|
||||||
needs: build-server
|
needs: build-server
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: https://github.com/actions/setup-dotnet@v3
|
uses: https://github.com/actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 7.0
|
dotnet-version: 7.0
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
- name: Setup Sonarqube Dependencies
|
- name: Setup Sonarqube Dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install --yes openjdk-11-jre
|
apt-get install --yes openjdk-11-jre
|
||||||
dotnet tool install --global dotnet-sonarscanner
|
dotnet tool install --global dotnet-sonarscanner
|
||||||
dotnet tool install --global dotnet-coverage
|
dotnet tool install --global dotnet-coverage
|
||||||
export PATH="$PATH:$HOME/.dotnet/tools"
|
export PATH="$PATH:$HOME/.dotnet/tools"
|
||||||
- name: Sonarqube Begin
|
- name: Sonarqube Begin
|
||||||
run: |
|
run: |
|
||||||
dotnet sonarscanner begin /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}"
|
dotnet sonarscanner begin /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}"
|
||||||
|
|
||||||
- name: Sonarqube Scan
|
- name: Sonarqube Scan
|
||||||
run: |
|
run: |
|
||||||
dotnet build
|
dotnet build
|
||||||
# dotnet test --collect "Code Coverage" --logger trx --results-directory "TestsResults"
|
# dotnet test --collect "Code Coverage" --logger trx --results-directory "TestsResults"
|
||||||
# dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml'
|
# dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml'
|
||||||
- name: Sonarqube End
|
- name: Sonarqube End
|
||||||
run: |
|
run: |
|
||||||
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||||
|
|
Loading…
Reference in a new issue