Merge pull request #225 from nmaas-platform/210-the-access-modal-shou… #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests and Sonar analysis | |
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@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Install dependencies | |
run: npm ci --force | |
- name: Check tests with coverage analysis | |
run: | | |
chmod +x ./gradlew | |
./gradlew testCoverage | |
- name: Run Sonar analysis | |
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 |