Skip to content
Merged
Show file tree
Hide file tree
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
456 changes: 456 additions & 0 deletions .github/workflows/release.yml

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions .github/workflows/test_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: test-pull-request

on:
workflow_dispatch:
pull_request:
branches: [main, dev]
types: [opened, synchronize, reopened]

jobs:
# --- EDIT MODE ---

test-unity-2022-3-62f3-editmode:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/2022.3.62f3"
unityVersion: "2022.3.62f3"
testMode: "editmode"
secrets: inherit

test-unity-2023-2-22f1-editmode:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/2023.2.22f1"
unityVersion: "2023.2.22f1"
testMode: "editmode"
secrets: inherit

test-unity-6000-3-1f1-editmode:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/6000.3.1f1"
unityVersion: "6000.3.1f1"
testMode: "editmode"
secrets: inherit

# --- PLAY MODE ---

test-unity-2022-3-62f3-playmode:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/2022.3.62f3"
unityVersion: "2022.3.62f3"
testMode: "playmode"
secrets: inherit

test-unity-2023-2-22f1-playmode:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/2023.2.22f1"
unityVersion: "2023.2.22f1"
testMode: "playmode"
secrets: inherit

test-unity-6000-3-1f1-playmode:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/6000.3.1f1"
unityVersion: "6000.3.1f1"
testMode: "playmode"
secrets: inherit

# --- STANDALONE ---

test-unity-2022-3-62f3-standalone:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/2022.3.62f3"
unityVersion: "2022.3.62f3"
testMode: "standalone"
secrets: inherit

test-unity-2023-2-22f1-standalone:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/2023.2.22f1"
unityVersion: "2023.2.22f1"
testMode: "standalone"
secrets: inherit

test-unity-6000-3-1f1-standalone:
uses: ./.github/workflows/test_unity_plugin.yml
with:
projectPath: "./Unity-Tests/6000.3.1f1"
unityVersion: "6000.3.1f1"
testMode: "standalone"
secrets: inherit

# -------------------
108 changes: 108 additions & 0 deletions .github/workflows/test_unity_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: test-unity-plugin

##############################################################################
# 1. Triggers
##############################################################################
on:
workflow_dispatch:
workflow_call:
inputs:
projectPath: { required: true, type: string }
unityVersion: { required: true, type: string }
testMode: { required: true, type: string }
secrets:
UNITY_LICENSE: { required: true }
UNITY_EMAIL: { required: true }
UNITY_PASSWORD: { required: true }

##############################################################################
# 2. Job – runs only after a maintainer applies the `ci-ok` label
##############################################################################
jobs:
test:
if: |
github.event_name != 'pull_request_target' ||
contains(github.event.pull_request.labels.*.name,'ci-ok')
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
platform: [base, windows-mono]

name: ${{ inputs.unityVersion }} ${{ inputs.testMode }} on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}

# permissions: # minimize the default token
# contents: write
# pull-requests: write

steps:
# --------------------------------------------------------------------- #
# 2-a. (PR only) abort if the contributor also changed workflow files
# --------------------------------------------------------------------- #
- name: Abort if workflow files modified
if: ${{ github.event_name == 'pull_request_target' }}
run: |
git fetch --depth=1 origin "${{ github.base_ref }}"
if git diff --name-only HEAD origin/${{ github.base_ref }} | grep -q '^\.github/workflows/'; then
echo "::error::This PR edits workflow files – refusing to run with secrets"; exit 1;
fi

# --------------------------------------------------------------------- #
# 2-b. Checkout the contributor’s commit safely
# --------------------------------------------------------------------- #
- uses: actions/checkout@v6
with:
lfs: false

# --------------------------------------------------------------------- #
# 2-c. Free disk space
# --------------------------------------------------------------------- #
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

# --------------------------------------------------------------------- #
# 2-d. Cache & run the Unity test-runner
# --------------------------------------------------------------------- #
- uses: actions/cache@v4
with:
path: |
${{ inputs.projectPath }}/Library
~/.cache/unity3d
key: ${{ inputs.unityVersion }} ${{ inputs.testMode }} on ${{ matrix.platform }}

# --------------------------------------------------------------------- #
- name: Generate custom image name
id: custom_image
run: echo "image=unityci/editor:ubuntu-${{ inputs.unityVersion }}-${{ matrix.platform }}-3" >> $GITHUB_OUTPUT
shell: bash

- uses: game-ci/unity-test-runner@v4
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ inputs.projectPath }}
unityVersion: ${{ inputs.unityVersion }}
testMode: ${{ inputs.testMode }}
customImage: ${{ steps.custom_image.outputs.image }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
checkName: ${{ inputs.unityVersion }} ${{ inputs.testMode }} ${{ matrix.platform }} Test Results
artifactsPath: artifacts-${{ inputs.unityVersion }}-${{ inputs.testMode }}-${{ matrix.platform }}
customParameters: -CI true -GITHUB_ACTIONS true

# --------------------------------------------------------------------- #
- uses: actions/upload-artifact@v4
if: always()
with:
name: Test results for ${{ inputs.unityVersion }} ${{ inputs.testMode }} on ${{ matrix.platform }}
path: ${{ steps.tests.outputs.artifactsPath }}
77 changes: 2 additions & 75 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,75 +1,2 @@
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
/[Mm]emoryCaptures/

# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta

# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*

# Autogenerated Jetbrains Rider plugin
[Aa]ssets/Plugins/Editor/JetBrains*

# Visual Studio cache directory
.vs/

# Gradle cache directory
.gradle/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db

# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta

# Unity3D generated file on crash reports
sysinfo.txt

# Builds
*.apk
*.unitypackage

# Crashlytics generated file
crashlytics-build.properties

*/AndroidLogcatSettings.asset
/Assets/StreamingAssets

# Crashlytics generated file
crashlytics-build.properties

# ODIN Ignore the auto-generated AOT compatibility dll.
/Assets/Plugins/Sirenix/Assemblies/AOT/*
/Assets/Plugins/Sirenix/Assemblies/AOT**

# ODIN Ignore all unpacked demos.
/Assets/Plugins/Sirenix/Demos/*

# ODIN plugin
/Assets/Plugins/Sirenix**
# Claude
.claude
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cSpell.words": [
"editmode",
"playmode"
]
}
6 changes: 0 additions & 6 deletions .vsconfig

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/_PackageRoot/package.json

This file was deleted.

2 changes: 0 additions & 2 deletions Commands/NPM--AddUser.bat

This file was deleted.

2 changes: 0 additions & 2 deletions Commands/NPM--CopyREADME.bat

This file was deleted.

3 changes: 0 additions & 3 deletions Commands/NPM--UpdateDependencies.bat

This file was deleted.

3 changes: 0 additions & 3 deletions Commands/NPM--VersionMajor.bat

This file was deleted.

3 changes: 0 additions & 3 deletions Commands/NPM--VersionMinor.bat

This file was deleted.

3 changes: 0 additions & 3 deletions Commands/NPM--VersionPatch.bat

This file was deleted.

23 changes: 0 additions & 23 deletions Commands/[!!!]--GitHub--Release.bat

This file was deleted.

5 changes: 0 additions & 5 deletions Commands/[!!!]--NPM--Publish.bat

This file was deleted.

23 changes: 0 additions & 23 deletions Commands/[!]--GitHub--DraftRelease.bat

This file was deleted.

Loading
Loading