build: add jacoco and sonarcloud report #7
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: 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 GitHub Actions / Run Maven TestsInvalid workflow file
|
||
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 |