Feature/bootstrap5 #130
Workflow file for this run
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: Java CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build with Sbt | |
run: sbt compile | |
- name: Test | |
run: sbt githubTest | |
- name: Upload to Codecov | |
uses: codecov/[email protected] | |
with: | |
fail_ci_if_error: true | |
- name: Replace all working directory paths with sources path | |
run: if [[ -n "modules/backend/target/scala-3.3.1-RC4/scoverage-report/scoverage.xml" ]]; then sed -i -e s,`pwd`,/github/workspace,g modules/backend/target/scala-3.3.1-RC4/scoverage-report/scoverage.xml; fi | |
shell: bash | |
- name: Analyze with SonarCube | |
uses: sonarsource/sonarqube-scan-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
with: | |
args: > | |
-Dsonar.projectKey=kamenitxan_Jakon_AYX5P6qaok6eoBlpoZHT | |
-Dsonar.sources=modules/backend/src | |
-Dsonar.verbose=false | |
-Dsonar.exclusions=modules/backend/src/main/resources/**,modules/backend/src/test/** | |
-Dsonar.scala.coverage.reportPaths=modules/backend/target/scala-3.3.1-RC4/scoverage-report/scoverage.xml |