-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: install latest node if setup-node fails (#186)
Continues if the setup-node action fails to install, and then installs latest node if there is no node version installed. Judging by [this website](https://node.green/) showing note compatibilities, node is almost entirely backwards compatible, which is why I went with the latest version rather than e.g. node 20. Additionally, adds a node version to the package.json so that this PR can merge - the v1 action version still chokes when not finding the node version. This is tested by adding the trunk-action repo to the [repo tests](https://github.com/trunk-io/trunk-action/actions/runs/6156480974/job/16705376207?pr=186), which does not have a node version in main. However, the runners have node installed, so the action doesn't attempt to install a default version - I'm not sure if there's a better way to test that/if it's worth it.
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"dependencies": { | ||
"chai": "^4.3.7" | ||
}, | ||
"engines": { | ||
"node": "20.6.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters