Skip to content

Fix lint using incorrect commit for PRs #298

Fix lint using incorrect commit for PRs

Fix lint using incorrect commit for PRs #298

Workflow file for this run

name: Unity CI
on:
push:
branches:
- main
# Review permissions carefully; will cause arbitrary code execution of pull requests!
pull_request_target: {}
jobs:
test:
strategy:
matrix:
unity_version: [ "2019.4.31f1", "2022.3.6f1" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
- name: Upgrade to Unity 2022
if: ${{ matrix.unity_version == '2022.3.6f1' }}
run: git apply --whitespace=fix .github/unity2022.patch
- uses: anatawa12/sh-actions/resolve-vpm-packages@master
with:
repos: |
https://vpm.nadena.dev/vpm.json
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ runner.os }}-unity-${{ matrix.unity_version }}
restore-keys: Library-
- uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ matrix.unity_version }}
projectPath: .
# TODO: PlayMode (incl. All) causes GameCI to hang. figure out if it's needed?
testMode: EditMode
coverageOptions: 'generateAdditionalMetrics;generateHtmlReport;generateBadgeReport;assemblyFilters:+enitimeago.non-destructive-mmd.*'
- uses: actions/upload-artifact@v4
if: always()
with:
name: Test results ${{ matrix.unity_version }}
path: artifacts
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
- uses: anatawa12/sh-actions/resolve-vpm-packages@master
with:
repos: |
https://vpm.nadena.dev/vpm.json
https://hai-vr.github.io/vpm-listing/index.json
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ runner.os }}-unity-2019.4.31f1
restore-keys: Library-
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
unityVersion: 2019.4.31f1
# vpm-manifest.json is modified.
# TODO: does this have lockfile semantics? would committing it help?
allowDirtyBuild: true
# Use this for >2021
# https://davidmfinol.com/gameci-2_testing.html
#buildMethod: Packages.Rider.Editor.RiderScriptEditor.SyncSolution
buildMethod: UnityEditor.SyncVS.SyncSolution
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "5.0.x"
- name: dotnet format Editor
run: dotnet format --verify-no-changes --verbosity diagnostic enitimeago.non-destructive-mmd.editor.csproj --exclude ./Packages/enitimeago.non-destructive-mmd/Editor/vendor
- name: dotnet format Runtime
run: dotnet format --verify-no-changes --verbosity diagnostic enitimeago.non-destructive-mmd.runtime.csproj
- name: dotnet format Tests
run: dotnet format --verify-no-changes --verbosity diagnostic enitimeago.non-destructive-mmd.tests.csproj