Skip to content

Upgrade Unity versions used to run tests on CI (Unity 6.5/ test-framework v1.7.0)#42

Merged
nowsprinting merged 7 commits into
masterfrom
chore/unity65
Jun 27, 2026
Merged

Upgrade Unity versions used to run tests on CI (Unity 6.5/ test-framework v1.7.0)#42
nowsprinting merged 7 commits into
masterfrom
chore/unity65

Conversation

@nowsprinting

@nowsprinting nowsprinting commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Unity 6.5 (6000.5.1f1) to the CI test matrix
  • Upgrade several packages and fix deprecated API usage introduced by Unity 6.5
  • Fix compile error on Unity 6.5: guard Is.BinarySerializable example with #if !ENABLE_UTF_1_7

Changes

CI

  • Add 6000.5.1f1 to the unityVersion matrix

Package upgrades

  • com.cysharp.unitask: 2.5.x → 2.5.11
  • com.nowsprinting.create-script-folders-with-tests: 1.3.x → 1.4.0
  • com.nowsprinting.test-helper: 1.4.x → 1.5.0
  • com.nowsprinting.test-helper.ui: 1.2.x → 1.3.0

Deprecated API fixes (Unity 6.4+, CS0618 as error)

  • Treat CS0618 (obsolete) as a compile error (Default.globalconfig)
  • Replace FindObjectOfType / FindObjectsOfType with #if UNITY_2022_3_OR_NEWER guards
  • Replace FindFirstObjectByType with FindAnyObjectByType (obsolete in Unity 6.4)

Unity 6.5 / test-framework 1.7 compatibility

  • Update UnityTestFrameworkVersionCheck test cases to cover Unity 6.5 (6000.5.0f1+)
  • Add ENABLE_UTF_1_7 to APIExamples.Tests.asmdef versionDefines
  • Guard BinarySerializableConstraint example with #if !ENABLE_UTF_1_7

Misc

  • Add Claude Code settings (.claude/)
  • Bump copyright year to 2026

Background: Why Is.BinarySerializable broke on Unity 6.5

Unity 6.5 ships com.unity.test-framework 1.7.0, which bumps com.unity.ext.nunit
from 2.0.5 to 2.1.0. Despite the assembly version remaining 3.5.0.0, Unity's custom
NUnit 3.5 fork in 2.1.0 removes BinarySerializableConstraint — because
BinaryFormatter is deprecated in .NET. XmlSerializableConstraint is still present.

The fix adds an ENABLE_UTF_1_7 version define (matching the repo's existing
ENABLE_UTF_1_5 / ENABLE_UTF_1_6 convention) and wraps the
BinarySerializableSample class and its test in #if !ENABLE_UTF_1_7.

@github-actions

This comment has been minimized.

@nowsprinting nowsprinting changed the title Upgrade Unity versions used to run tests on CI (Unity 6.5) Upgrade Unity versions used to run tests on CI (Unity 6.5/ test-framework v1.7.0) Jun 27, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

Code Metrics Report

master (0558116) #42 (de502e2) +/-
Coverage 40.3% 39.3% -1.1%
Code to Test Ratio 1:4.0 1:4.0 +0.0
Test Execution Time 5m20s 5m47s +27s
Details
  |                     | master (0558116) | #42 (de502e2) |  +/-  |
  |---------------------|------------------|---------------|-------|
- | Coverage            |            40.3% |         39.3% | -1.1% |
  |   Files             |               25 |            25 |     0 |
  |   Lines             |              478 |           478 |     0 |
- |   Covered           |              193 |           188 |    -5 |
+ | Code to Test Ratio  |            1:4.0 |         1:4.0 |  +0.0 |
  |   Code              |             1256 |          1255 |    -1 |
+ |   Test              |             5048 |          5057 |    +9 |
- | Test Execution Time |            5m20s |         5m47s |  +27s |

Code coverage of files in pull request scope (9.4% → 0.0%)

Files Coverage +/- Status
Assets/InputExample/Scripts/Runtime/FirstPersonControllerLegacy.cs 0.0% -9.5% affected

Reported by octocov

@nowsprinting nowsprinting merged commit 37c391c into master Jun 27, 2026
22 checks passed
@nowsprinting nowsprinting deleted the chore/unity65 branch June 27, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant