Skip to content

Merge branch 'main' of https://github.com/TitaniumTitans/2023ChargedUp #307

Merge branch 'main' of https://github.com/TitaniumTitans/2023ChargedUp

Merge branch 'main' of https://github.com/TitaniumTitans/2023ChargedUp #307

Workflow file for this run

---
name: SonarQube Analysis
on:
push:
pull_request:
branches: [ "main" ]
types: [opened, reopened, review_requested]
pull_request_review:
types: [edited, submitted]
workflow_dispatch:
jobs:
build:
name: SonarQube Build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Cache SonarQube packages
uses: actions/[email protected]
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Run checkstyle
run: ./gradlew checkstyleMain
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: ./gradlew build sonar --info