https://github.com/wooga/spock-unity-version-manager-extension
unity version manager spock extension
https://github.com/wooga/spock-unity-version-manager-extension
gradle java wdk
Last synced: 5 months ago
JSON representation
unity version manager spock extension
- Host: GitHub
- URL: https://github.com/wooga/spock-unity-version-manager-extension
- Owner: wooga
- License: apache-2.0
- Created: 2020-03-04T09:20:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T13:25:15.000Z (over 1 year ago)
- Last Synced: 2024-11-15T09:50:00.033Z (5 months ago)
- Topics: gradle, java, wdk
- Language: Groovy
- Homepage:
- Size: 149 KB
- Stars: 0
- Watchers: 30
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
spock-unity-version-manager-extension
=====================================[](https://coveralls.io/github/wooga/spock-unity-version-manager-extension?branch=master)
@UnityInstallation
------------------This spock extension allows to install Unity versions before test runs. The return value will be a `Installation` object with information about the location und path to the unity executable.
Be aware the installation process can be very time consuming.### Example
```groovy
class ExampleSpec extends Specification {
@Shared
@UnityInstallation(version="2018.4.12f1")
Installation unity@Shared
@UnityInstallation(version = "2019.3.3f1", modules = [Component.android, Component.ios])
Installation unityWithModulesdef "execute unity build"() {
expect:
unity.location.exists()
unityWithModules.location.exists()
}
}
```It is also possible to inject a test repository directly into a feature method
```groovy
@UnityInstallation(version="2018.4.12f1")
@Unroll
def "execute unity build"(Installation unity) {
expect:
unity.location.exists()
}@UnityInstallation(version = "2019.3.3f1", cleanup = true)
def "feature has unity installed before execution"(String a, String b, Installation installation) {
expect:
installation.location.exists()
UnityVersionManager.locateUnityInstallation("2019.3.3f1")where:
a | b
"test" | "test2"
installation = null
}
```The `@GithubRepository` supports the following parameters:
| name | default | description |
| ------------------------- | -------------------------------- | --------------------------------------------------------------------------------------------------- |
| version | | The version of unity to be installed |
| basePath | | An optional base path to install unity to. The final destination will be `${basePath}/Unity-${version}` |
| modules | [] | A list of `Component` to be installed |
| cleanup | false | Delete the version after the test run. The version will always be installed in temporary location when the value is `true` |LICENSE
=======Copyright 2020 Wooga GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License atUnless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[unity-version-manager]: github.com/Larusso/unity-version-manager