Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/check-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
PROJECT_NAME: UnityProject
PROJECT_PATH: "UnityProject/"
TARGET_PLATFORM: "Android"

jobs:
inspection:
Expand All @@ -27,32 +28,32 @@ jobs:
key: Library-lint-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: Library-lint-

- name: Generate Solution
- uses: game-ci/unity-builder@v4
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
run: unity-editor -batchmode -nographics -logFile /dev/stdout -projectPath ${{ env.PROJECT_PATH }} -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -username "$UNITY_EMAIL" -password "$UNITY_PASSWORD" -serial "$UNITY_SERIAL" -quit
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} # Unity professional
#UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} # Unity personal
with:
targetPlatform: ${{ env.TARGET_PLATFORM }}
projectPath: ${{ env.PROJECT_PATH }}
buildMethod: Packages.Rider.Editor.RiderScriptEditor.SyncSolution
#unityLicensingServer: [url to your license server]

- name: Return License
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
if: always()
run: unity-editor -logFile /dev/stdout -username "$UNITY_EMAIL" -password "$UNITY_PASSWORD" -quit -returnlicense

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

# dotnet tool update fails to run if pwd contains several projetcs
- run: mkdir UnityProjectIsolated; mv -v ${{ env.PROJECT_PATH }}/* UnityProjectIsolated/

# Inspect code instalation could not add itself to path. Doing it before manually.
- run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH

- run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Inspect code
uses: muno92/resharper_inspectcode@v1
with:
solutionPath: ${{ env.PROJECT_PATH }}${{ env.PROJECT_NAME }}.sln
solutionPath: UnityProjectIsolated/${{ env.PROJECT_NAME }}.sln
solutionWideAnalysis: false
minimumReportSeverity: warning
minimumSeverity: warning
Expand Down