CI: Fix formatting #130
Workflow file for this run
This file contains 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: Unity Actions | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: {} | |
### Refer to https://game.ci/docs/github/getting-started | |
jobs: | |
test: | |
permissions: | |
checks: write | |
name: Run all tests ✨ | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-test | |
- uses: game-ci/unity-test-runner@v4 | |
id: testRunner | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
projectPath: . | |
- uses: actions/upload-artifact@v3 | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
name: Test results (playmode) | |
path: ${{ steps.testRunner.outputs.artifactsPath }} | |
build: | |
needs: test | |
name: Build for ${{ matrix.targetPlatform }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
targetPlatform: | |
- StandaloneLinux64 | |
- StandaloneWindows64 | |
- StandaloneOSX | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-${{ matrix.targetPlatform }} | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: ${{ matrix.targetPlatform }} | |
projectPath: . | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Build-${{ matrix.targetPlatform }} | |
path: build | |
lint: | |
name: Lint | |
permissions: | |
checks: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: StandaloneLinux64 | |
projectPath: . | |
- uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
with: | |
targetPlatform: StandaloneLinux64 | |
projectPath: . | |
buildMethod: Packages.Rider.Editor.RiderScriptEditor.SyncSolution | |
allowDirtyBuild: true | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: PWD | |
run: pwd | |
- name: LS | |
run: ls | |
- name: Check formatting | |
run: | | |
cd /home/runner/work/MAEPS/MAEPS | |
dotnet restore workspace.sln || echo "dotnet restore fucked up" | |
dotnet format workspace.sln --exclude "Assets/RosMessage/" --exclude "Assets/YamlDotNet/" --exclude "Assets/Editor/" --verify-no-changes | |