Commit Graph

289 Commits

Author SHA1 Message Date
Aaron Trudeau
0df3ab6b88 fix documentation and add error message for missing jq 2023-06-07 01:23:53 -04:00
Aaron Trudeau
1afbd6b347 fix fs mocks and run yarn build 2023-05-24 00:13:31 -04:00
Aaron Trudeau
8ac6a10c96 Add packageMode inputs to main 2023-05-23 20:30:33 -04:00
Aaron Trudeau
ffb0014506 Merge in changes 2023-05-23 20:29:00 -04:00
Tim Cassell
31086d9859 Add standalone testmode support (#219)
* Add standalone support.

* Add standalone tests.

* UnityStandaloneScripts volume on windows

* Update test framework in test project.

* Revert IL2CPP setting in test project.
Add test for IL2CPP.

* Update dist/test-standalone-scripts/Assets/Player/UnityTestRunnerAction/TestRunCallback.cs

Co-authored-by: Webber Takken <webber.nl@gmail.com>

* Use 2019.2.21f1

* Unity is being dumb, use 2019.4.40f1 for all workflows.

* Disable PlayerConnection on build.
Print player log.

* Add comment about code coverage support in standalone.

* Update node-version in test

---------

Co-authored-by: Webber Takken <webber.nl@gmail.com>
2023-04-20 22:23:15 -05:00
dependabot[bot]
cfa9076acb Bump json5 from 1.0.1 to 1.0.2 (#213)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-07 21:01:36 +01:00
David Finol
d982116b88 Run linting (#207) 2022-12-24 23:45:38 +01:00
hubert
b9980d6db7 Trims output length to avoid hitting github 2Mb limitation (#206)
Co-authored-by: ahub <ahub@riseup.net>
2022-12-16 13:44:40 -06:00
dependabot[bot]
34809a534f Bump minimatch from 3.0.4 to 3.1.2 (#203)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-04 01:26:08 +01:00
dependabot[bot]
677bd599b0 Bump decode-uri-component from 0.2.0 to 0.2.2 (#204)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-04 01:25:49 +01:00
Nick Maltbie
be0f55d3cf Added dontClear coverage flag to default coverage options (#202) v2.1.1 2022-12-04 01:21:13 +01:00
simensan
42c28a953e Add unityLicensingServer to action.yml so warning for input dissapears (#201) 2022-11-29 12:03:21 +01:00
simensan
9fe2feb3c9 Feature/add support for licensing server (#196)
* First take on adding support for sending in unity licensing server url on linux

* Forgot to build dist

* Moved services-config parsing to typescript

* Need to set licensing server env variable for activate.sh

* Forgot unused docker mount directory /resources
v2.1.0
2022-11-04 12:35:06 +01:00
Webber Takken
68d1df1d1b fix: broken lints (#199)
* fix: broken lints

* fix broken CI
2022-11-03 18:27:46 -05:00
Michal Cichra
698c08cf4e feat: ensure cleanup of docker containers (#198)
Cancelled or timeouted workflow would keep the docker container running.
Closes game-ci/unity-test-runner#197

This has two parts:

Part one. The entrypoints.

`runs.post`: GitHub Action metadata allow running something after the
action (regardless of a failure, crash, timeout, ...).
https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost

However, it needs to be a `.js` file and it can't be configured to pass
any arguments.

There already was `index.js` used as the main entrypoint.
The build process of this file uses typescript compiler and ncc to pack
all dependencies into one .js file. And ncc has no way of generating
multiple files in one go, so the only solution would be to run ncc twice
and generate two independent files.

That would be quite unfortunate, wasting time and storage. So I rather
came up with a new entrypoint that symlinked from two locations.
And this new entrypoint understands how it was executed, so it can run
the correct behaviour. This makes it easy to add `runs.pre` if needed.

This new entrypoint is in `index.ts`. The original `index.ts` is now in
`main.ts`.

Part two.
The signals. I've tried:
* try/catch/finally around the `await Docker.run`. Catch and finally are
  not executed when process receives SIGINT. See the discussion in: https://github.com/nodejs/node/discussions/29480
* New AbortController and AbortSignal. Great concept, but the
  action.exec does not support it. So it can't be aborted.
* Doing cleanup on `process.on('exit')`. Unfortunately you can't really
  do async stuff from there, so can't really run the docker rm command
to delete the container.
* Using `process.on('SIGINT')`. For some reason that wasn't really
  executing for me. I'd not put my hand in fire for this, but I assume
because it was in the signal handler it does something special, or would
heed to be scheduled for later with `setTimeout(0)`.

Evaluating all these I came to a conclusion that it is fragile and just
relying on a `runs.post` is much better and safer.
`
2022-11-03 19:14:51 +01:00
Paul Pacheco
5263cf0ab1 rebuild to take into account new @action/core (#195)
After upgrading actions core, I apprently forgot to rebuild the
dist folder,  so it didn't take the change.
2022-10-16 22:15:42 +02:00
Paul Pacheco
3bffd88e03 upgrade to node 16 (#193)
node12 actions are deprecated.
See documentation here:
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/

Currently, the unity builder action gives me the following warning:
```
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: game-ci/unity-test-runner, game-ci/unity-builder
```
2022-10-13 23:19:52 +02:00
Paul Pacheco
45ec546c43 upgrade actions/core to 1.10.0 (#194)
* upgrade actions/core to 1.10.0

The current version of actions/core produces a lot of warning about deprecated set-output command,  like this:

```
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
```

the new version of actions/core uses the environment files instead, so this version bump should fix the warning

* reran yarn
2022-10-13 23:17:35 +02:00
Webber Takken
26c9b7abe1 Update FUNDING.yml (#192) 2022-09-17 13:50:07 -04:00
dependabot[bot]
811160c5b3 Bump @actions/core from 1.6.0 to 1.9.1 (#191)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-20 01:15:06 +02:00
Aaron Trudeau
402522369e log permissions for package folder 2022-06-30 21:33:56 -04:00
Aaron Trudeau
f75f0ebbd1 scrap file removals and print dir permissions 2022-06-30 21:15:19 -04:00
Aaron Trudeau
c9301a22f2 fix license activation files deletion 2022-06-30 21:01:28 -04:00
Aaron Trudeau
9169a99f4e try deleting all non-package files 2022-06-30 20:48:58 -04:00
Aaron Trudeau
1f56db93bb try logging hidden package files 2022-06-30 20:37:25 -04:00
Aaron Trudeau
6d87a92844 try deleting activate license file 2022-06-30 20:20:26 -04:00
Aaron Trudeau
9d2f6b8273 fix unity version error wording 2022-06-30 16:37:23 -04:00
Aaron Trudeau
bd60170f3f throw error if unity version is auto in package mode 2022-06-30 16:36:20 -04:00
Aaron Trudeau
dbb5a4cdbd move package mode check lower in the file 2022-06-30 14:46:31 -04:00
Aaron Trudeau
8bed00016b run yarn build 2022-06-30 14:09:48 -04:00
Aaron Trudeau
0061df2fca merge main 2022-06-30 14:09:25 -04:00
Skjalg S. Mæhre
3d5d2f5834 Add chownFilesTo (#187)
* add chownFilesTo

* added missing newline

* added more chownFilesTo
v2.0.3
2022-06-24 12:59:01 +02:00
Matthew Shiroma
e8774f3837 Added Windows Support (#184)
* Modifying js files to account for win support

* Added new powershell scripts to support windows invocation

* Fixed undefined error in stack trace logic

* Added new func for resolving image tag default

* Changed structure of docker.js to match new standard
2022-05-24 01:41:36 +02:00
Aaron Trudeau
76e4fa8414 Revert "add logic to copy package to folder without activation file"
This reverts commit b20d994b5d.
2022-05-11 00:06:45 -04:00
Aaron Trudeau
0e7c6f93e2 Revert "fix false positive activation file detection"
This reverts commit 580c9c14a0.
2022-05-11 00:06:38 -04:00
Aaron Trudeau
4895ba9da2 Revert "fix improper bash "if" formatting"
This reverts commit acb975bcea.
2022-05-11 00:06:33 -04:00
Aaron Trudeau
397d1bad5f Revert "TEMP remove conditional for package copying"
This reverts commit 4f12d83889.
2022-05-11 00:06:28 -04:00
Aaron Trudeau
4f12d83889 TEMP remove conditional for package copying 2022-05-11 00:00:54 -04:00
Aaron Trudeau
acb975bcea fix improper bash "if" formatting 2022-05-10 23:56:20 -04:00
Aaron Trudeau
580c9c14a0 fix false positive activation file detection 2022-05-10 23:49:47 -04:00
Aaron Trudeau
b20d994b5d add logic to copy package to folder without activation file 2022-05-10 23:47:07 -04:00
Aaron Trudeau
139a8b1b78 Revert "TEMP console log project folder"
This reverts commit 411ec51817.
2022-05-10 23:46:31 -04:00
Aaron Trudeau
411ec51817 TEMP console log project folder 2022-05-10 22:53:52 -04:00
Aaron Trudeau
b47553ab19 add assembly filters for coverage 2022-04-26 22:56:50 -04:00
Aaron Trudeau
ebd7a750c5 Revert "add codecoverage dependency to test package"
This reverts commit 4b2c03069d.
2022-04-26 22:37:34 -04:00
Aaron Trudeau
4b2c03069d add codecoverage dependency to test package 2022-04-26 20:33:31 -04:00
Aaron Trudeau
7eda8741f4 update name of package coverage steps 2022-04-26 19:56:22 -04:00
Aaron Trudeau
d0104eb324 add coverage to package mode tests 2022-04-26 19:46:44 -04:00
Aaron Trudeau
c927250c22 remove temp project manifest log 2022-04-26 13:35:16 -04:00
Aaron Trudeau
1580d4cb48 add code coverage package to generated project 2022-04-26 13:21:43 -04:00