Skip to content

build: add jacoco and sonarcloud report #7

build: add jacoco and sonarcloud report

build: add jacoco and sonarcloud report #7

Workflow file for this run

name: Run Maven Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
env:
THRESHR_KEY: ${{ secrets.THRESHR_KEY }}
THRESHR_CHANNEL: ${{ vars.THRESHR_CHANNEL }}
TEST_DATASOURCES_DEFAULT_URL: ${{ secrets.TEST_DATASOURCES_DEFAULT_URL }}
SONAR_TOKEN: ${{ SONAR_TOKEN }}

Check failure on line 15 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Run Maven Tests

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 15, Col: 20): Unrecognized named-value: 'SONAR_TOKEN'. Located at position 1 within expression: SONAR_TOKEN
environment: redsky api
runs-on: ubuntu-latest
steps:
# https://github.com/actions/virtual-environments/issues/709
- name: "󰆴 Free disk space"
run: |
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean
df -h
- name: " Checkout repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "󰬷 Set up JDK 17"
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: "󰙨 test with maven"
run: mvn -B test --file pom.xml jacoco:report
- name: " SonarCloud Scan"
run: |
mvn sonar:sonar -Pcoverage \
-Dsonar.token=$SONAR_TOKEN
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=graqr \
-Dsonar.projectKey=Graqr_Threshr