1661-Extract all absolute values into variables #1579
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: CI Build on PULL Request | |
on: | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
# JOB to run change detection | |
changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from the filter step | |
outputs: | |
cli: ${{ steps.filter.outputs.cli }} | |
client: ${{ steps.filter.outputs.client }} | |
server: ${{ steps.filter.outputs.server }} | |
steps: | |
# For pull requests, it's not necessary to check out the code | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
cli: | |
- 'cli/**' | |
client: | |
- 'client/**' | |
server: | |
- 'server/**' | |
cli: | |
needs: changes | |
if: ${{ needs.changes.outputs.cli == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up GraalVM for JDK 21 | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'graalvm-community' | |
java-version: '21' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
working-directory: cli | |
run: ../gradlew build jacocoTestReport sonar --stacktrace | |
client: | |
needs: changes | |
if: ${{ needs.changes.outputs.client == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up Node 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: client/package-lock.json | |
- name: run npm commands | |
working-directory: client | |
run: | | |
npm ci | |
npm run check | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: client/ | |
server: | |
needs: changes | |
if: ${{ needs.changes.outputs.server == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up GraalVM for JDK 21 | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'graalvm-community' | |
java-version: '21' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Gradle packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Build and analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_ACTIONS_BUILD: true | |
working-directory: server | |
run: ../gradlew check jacocoTestReport sonar --scan --stacktrace |