Update Unity version and add some more VS setup (#98) #1
This file contains hidden or 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
| name: Formatting Check | |
| on: | |
| push: | |
| paths: | |
| - '**.java' | |
| - '**.cs' | |
| pull_request_target: | |
| branches: | |
| - main | |
| paths: | |
| - '**.java' | |
| - '**.cs' | |
| jobs: | |
| csharp: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
| sparse-checkout: unity | |
| sparse-checkout-cone-mode: false | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.x' | |
| - name: Install CSharpier | |
| run: dotnet tool install -g csharpier | |
| - name: Check CSharp formatting | |
| run: csharpier check unity/Assets/QuestNav/ | |
| java: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: questnav-lib | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
| sparse-checkout: questnav-lib | |
| sparse-checkout-cone-mode: false | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: '8.11' | |
| - name: Cache Gradle Dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-lib-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle-lib- | |
| - name: Make gradlew Executable | |
| run: 'chmod +x ./gradlew' | |
| - name: Check Java formatting | |
| run: ./gradlew spotlessJavaCheck |