Skip to content

Unity 6.5 / 6000.5.1f1 package mode tests fail with Code Coverage CS0619 errors #306

Description

@litefeel

Bug description

game-ci/unity-test-runner@v4 fails when running Unity 6.5 / 6000.5.1f1 tests in package mode. The failure happens during script compilation before test results are produced.

The compile error comes from com.unity.testtools.codecoverage, where TreeView / TreeViewItem obsolete API warnings are emitted as CS0619 errors under Unity 6000.5.1f1.

How to reproduce

Steps to reproduce the behavior:

  1. Run game-ci/unity-test-runner@v4 against a Unity package using Unity 6000.5.1f1.
  2. Set packageMode: true.
  3. Run the tests on an Ubuntu runner.
  4. The Run tests step fails during Unity script compilation.

Key GitHub Actions config:

- name: Run tests
  uses: game-ci/unity-test-runner@v4
  env:
    UNITY_LICENSE: ${{ env.UNITY_LICENSE }}
  with:
    projectPath: MyPlugin
    packageMode: true
    unityVersion: 6000.5.1f1
    githubToken: ${{ secrets.GITHUB_TOKEN }}

Observed environment:

  • Job name: Test 6000.5.1f1
  • Action: game-ci/unity-test-runner@v4
  • Resolved action SHA in the log: 0ff419b913a3630032cbe0de48a0099b5a9f0ed9
  • Runner image: ubuntu-24.04
  • Unity Editor: 6000.5.1f1 (0d9463e84828), branch 6000.5/staging

Relevant log output:

Library/PackageCache/com.unity.testtools.codecoverage@6c0a8bccec22/Editor/CoverageWindow/IncludedAssembliesTreeView.cs(124,36): error CS0619: 'TreeViewItem' is obsolete: 'TreeViewItem is now deprecated. You can likely now use TreeViewItem<int> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeViewItem<InstanceID> to get the proper typing.'
Library/PackageCache/com.unity.testtools.codecoverage@6c0a8bccec22/Editor/CoverageWindow/IncludedAssembliesTreeView.cs(12,40): error CS0619: 'TreeView' is obsolete: 'TreeView is now deprecated. You can likely now use TreeView<int> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeView<InstanceID> to get the proper typing.'
Library/PackageCache/com.unity.testtools.codecoverage@6c0a8bccec22/Editor/CoverageWindow/IncludedAssembliesTreeView.cs(30,48): error CS0619: 'TreeViewItem' is obsolete: 'TreeViewItem is now deprecated. You can likely now use TreeViewItem<int> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeViewItem<InstanceID> to get the proper typing.'
Library/PackageCache/com.unity.testtools.codecoverage@6c0a8bccec22/Editor/CoverageWindow/IncludedAssembliesTreeView.cs(35,28): error CS0619: 'TreeViewItem' is obsolete: 'TreeViewItem is now deprecated. You can likely now use TreeViewItem<int> instead and not think more about it. But if you were using that identifier to store InstanceID data, you should instead opt to upgrade your TreeViews to use TreeViewItem<InstanceID> to get the proper typing.'
*** Tundra build failed
Scripts have compiler errors.
Unexpected exit code 1
The process '/usr/bin/docker' failed with exit code 1
  • Expected behavior

unity-test-runner should be able to run package mode tests on Unity 6.5 / 6000.5.1f1, or document/configure a compatible Code Coverage package/version for this Unity release.

Additional details

This appears to be related to compiling com.unity.testtools.codecoverage under Unity 6000.5.1f1, where obsolete TreeView / TreeViewItem API usage is now fatal. Please let me know if there is a recommended workaround for package mode, such as overriding the Code Coverage package version or disabling coverage for Unity 6.5 until the package is compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions