Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for installing tsserver #67

Merged
merged 7 commits into from
Nov 5, 2024
Merged

Conversation

dannykim-endor
Copy link
Contributor

@dannykim-endor dannykim-endor commented Oct 24, 2024

Add support for installing tsserver prior to running Endor's github action

@dannykim-endor dannykim-endor self-assigned this Oct 24, 2024
@dkourkouzelis
Copy link
Contributor

Looks good to me but adding @hghmn as well.

if (!commandExists(command)) {
// Install it
core.info(`Installing tsserver`);
await exec.exec("npm", ["install", "-g", "typescript"]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if npm is globally available in the GitHub action? Or would this require an additional step in the workflow like setup-node?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me double check...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hghmn according to GPT

"Yes, specifying using: "node20" in your action.yml file means that Node.js 20 will be available to your GitHub Action, and npm will also be available by default. Since npm is bundled with Node.js, you’ll be able to use npm commands within your action without additional setup."

Since we specify our action uses node20 to run, npm should be available.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to test this in a pipeline that installs and uses a different version of node than the default version installed for node20, and ensure that the tsserver binary is available in the PATH for endorctl.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested an action where I installed node18 then used the endorlabs/github-action and it still worked.

@dannykim-endor
Copy link
Contributor Author

@hghmn can you take another look?

@dannykim-endor dannykim-endor merged commit f7fea20 into main Nov 5, 2024
3 checks passed
@dannykim-endor dannykim-endor deleted the feature/CSE-2156 branch November 5, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants