Skip to content

Add Sonar Cloud Github Actions Workflow #5

Add Sonar Cloud Github Actions Workflow

Add Sonar Cloud Github Actions Workflow #5

Workflow file for this run

on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
name: Sonar Cloud
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: 21
- name: run sonar
working-directory: ./service
run: ./gradlew test sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}