2 Commits

Author SHA1 Message Date
Jeremiah a5a4b83a25 Sets prettier to run on the repo (#91379)
Prettier (an auto formatter) is set to only run within the tgui folder
currently. This removes that limitation, allowing it to automatically
format all supported files in the repo (.js, .html, .yml
[etc](https://prettier.io/docs/))

I made a few exceptions for bundled and generated files
I'm of the opinion that code should look uniform and am lazy enough to
want CTRL-S to format files without having to think beyond that
2025-06-05 19:13:02 -04:00
MichiRecRoom ba7f720eaa CI now uses actions/setup-node to setup Node and restore the Yarn cache (#89363)
## About The Pull Request
This PR changes CI to use `actions/setup-node` to setup Node, instead of
using `tools/ci/install_node.sh`. The version given to this action is
the same as specified in `dependencies.sh`.

This fixes the issue of CI not using the node version provided in
`dependencies.sh`. Previously, it was using the system-wide Node, which
at the time of this PR is `v20.18.2`.

This change is NOT applied across all jobs, but is applied at minimum to
any jobs where the game is compiled. For example, any integration test
jobs now use `actions/setup-node` - but the "Remove guide comments" job
is untouched.

This PR has the additional following effects:
* The node install is no longer cached - it is instead downloaded from
<https://github.com/actions/node-versions> (or
<https://nodejs.org/dist/> if that fails). Being that the CI runner
needs to contact Github anyways to obtain the cached Node install, this
should make no difference.
* We no longer have to perform Yarn caching ourselves -
`actions/setup-node` does it for us! However, a side effect of this is
that the Yarn cache uses a different cache key now. I would have set up
the action to pull from the existing cache, but unfortunately that
wasn't an option.

Speaking of caching - the new action, `.github/actions/setup_node`, will
NOT restore the Yarn cache unless the `restore-yarn-cache` input is
`true`. This saves a couple seconds where we need node, but don't need
the yarn cache (such as in integration tests).
2025-02-07 12:54:26 -07:00