-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (50 loc) · 1.96 KB
/
check-code-style.yml
File metadata and controls
60 lines (50 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- '**.cs'
env:
PROJECT_NAME: UnityProject
PROJECT_PATH: "UnityProject/"
jobs:
inspection:
runs-on: ubuntu-latest
# Use gameCi container with installed Unity to keep editor dlls for linter
container: unityci/editor:ubuntu-2022.3.24f1-linux-il2cpp-3
name: Inspection
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Library
uses: actions/cache@v3
with:
path: Library
key: Library-lint-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: Library-lint-
- name: Generate Solution
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
- 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
# Inspect code instalation could not add itself to path. Doing it before manually.
- run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Inspect code
uses: muno92/resharper_inspectcode@v1
with:
solutionPath: ${{ env.PROJECT_PATH }}${{ env.PROJECT_NAME }}.sln
solutionWideAnalysis: false
minimumReportSeverity: warning
minimumSeverity: warning
include: |
**.cs