Skip to content

[SRV-940] Create sonarscan.yml - test default step #4

[SRV-940] Create sonarscan.yml - test default step

[SRV-940] Create sonarscan.yml - test default step #4

Workflow file for this run

name: SonarCloud Scan
on:
pull_request:
branches:
- main
jobs:
runAllTests:
name: ${{ matrix.unityVersion }} integration tests
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
testMode:
- editmode
unityVersion:
- 2021.3.32f1
steps:
- name: Checkout empty unity project repository
uses: actions/checkout@v4
with:
repository: "readyplayerme/rpm-unity-empty-project"
fetch-depth: 0
ref: main
token: ${{ secrets.DEV_SDK_TOKEN }}
- name: Cache Project
uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Get npm
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install openupm-cli
run: npm install -g openupm-cli
- name: Add core with current branch as package
run: openupm add com.readyplayerme.core@https://github.com/readyplayerme/rpm-unity-sdk-core.git#${{ github.ref_name }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=readyplayerme
-Dsonar.projectKey=readyplayerme_rpm-unity-sdk-core
-Dsonar.sources=.
-Dsonar.token=${{ secrets.SONAR_TOKEN }}