Skip to content

Feature/202307 code smells 24 #4751

Feature/202307 code smells 24

Feature/202307 code smells 24 #4751

name: Starsky SonarQube ClientApp NetCore Analyze PR
on:
pull_request:
types:
- synchronize
- opened
branches:
- master
paths:
- 'starsky/**'
- '.github/workflows/**'
- '!starsky/Dockerfile'
- '!starsky/docker_demo_setup.sh'
- '!history.md'
env:
PR_NUMBER_GITHUB: ${{ github.event.pull_request.number }}
jobs:
build:
runs-on: ubuntu-latest
env:
WEBSITE_SITE_NAME: "ci"
steps:
- name: 'Checkout repository on branch: ${{ github.REF }}'
uses: actions/checkout@v3
with:
ref: ${{ github.HEAD_REF }}
- name: Retrieve entire repository history
run: |
git fetch --prune --unshallow
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.412
- name: Use Java 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
check-latest: true
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
- name: Cache node modules clientapp (*nix)
uses: actions/cache@v3
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-clientapp-${{ hashFiles('./starsky/starsky/clientapp/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-clientapp-
- name: Cache nuget packages (*nix)
uses: actions/cache@v3
with:
# nuget cache files are stored in `~/.nuget/packages` on Linux/macOS
path: ~/.nuget/packages
key: ${{ runner.os }}-build-netcore-${{ hashFiles('./starsky/starsky/nuget-packages-list.json') }}
restore-keys: |
${{ runner.os }}-build-netcore-
- name: Cache sonarqube packages (*nix)
uses: actions/cache@v3
with:
# nuget cache files are stored in `~/.sonar` on Linux/macOS
path: ~/.sonar
key: ${{ runner.os }}-build-sonarqube
restore-keys: |
${{ runner.os }}-build-sonarqube-
- name: Build
shell: bash
env:
STARSKY_SONAR_KEY: ${{ secrets.STARSKY_SONAR_KEY }}
STARSKY_SONAR_LOGIN: ${{ secrets.STARSKY_SONAR_LOGIN }}
STARSKY_SONAR_ORGANISATION: ${{ secrets.STARSKY_SONAR_ORGANISATION }}
STARSKY_SONAR_URL: ${{ secrets.STARSKY_SONAR_URL }}
working-directory: ./starsky
run: bash build.sh --no-logo --no-publish