Skip to content
Snippets Groups Projects
Unverified Commit 6ced22f2 authored by Łukasz Łopatowski's avatar Łukasz Łopatowski Committed by GitHub
Browse files

Merge pull request #117 from nmaas-platform/114-add-ci-job-for-sonar-scan-execution

114 add ci job for sonar scan execution
parents 6acbb578 e2aed9eb
No related branches found
No related tags found
No related merge requests found
name: Run tests and Sonar update
on:
push:
branches:
- develop
jobs:
run-sonar:
runs-on: ubuntu-22.04
container:
image: docker://trion/ng-cli-karma:14.2.1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set execute permissions for gradlew
run: chmod +x ./gradlew
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install dependencies
run: npm ci --force
- name: Check test coverage
run: ./gradlew testCoverage
- name: Run Sonar update
env:
SONAR_LOGIN_TOKEN: ${{ secrets.SONAR_LOGIN_TOKEN }}
SONAR_HOST: ${{ vars.SONAR_HOST }}
SONAR_PROJECT_KEY: ${{ vars.SONAR_PROJECT_KEY }}
SONAR_PROJECT_NAME: ${{ vars.SONAR_PROJECT_NAME }}
SONAR_BRANCH: ${{ github.ref_name }}
run: ./gradlew -Dsonar.host.url=${SONAR_HOST} -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.projectName=${SONAR_PROJECT_NAME} -Dsonar.branch.name=${SONAR_BRANCH} -Dsonar.login=${SONAR_LOGIN_TOKEN} sonarqube
......@@ -52,7 +52,6 @@ task testCoverage(type: Exec) {
commandLine 'ng', 'test', '--browsers', 'Chromium', '--watch=false', '--code-coverage', '--source-map=false'
}
dependsOn(npm_install)
}
sonarqube {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment