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

Typescript Github Action shouldn't run from root directory #57

Open
JMKJR opened this issue Jun 28, 2021 · 0 comments
Open

Typescript Github Action shouldn't run from root directory #57

JMKJR opened this issue Jun 28, 2021 · 0 comments
Labels
🐛 Bug This isn't right... 🧹 Chore Those pesky little things that don't fit any other tags ⚒️ CI/CD Continuous integration/continuous deployment 🧠 Good 4 noobs Good for newcomers 🆘 Help Needed Help me pls <3 🌅 QOL Quality of life improvement

Comments

@JMKJR
Copy link
Contributor

JMKJR commented Jun 28, 2021

Problem

Our tsc github action runs from the root directory and uses the tsconfig.json in the root directory. This is a problem for a couple of reasons:

  1. You need a tsconfig.json in the project subdirectory anyways (eg. packages/ui/tsconfig.json) for proper VSCode editor feature functioning otherwise you run into issues.
  2. Because the action currently runs from the root directory, you need to re-install many of the packages you have already installed in the subdirectory at the root directory level to get access to their Typescript types. Not only is this redundant but it is also a problem for our lerna monorepo structure because the only packages that should be installed at the root level are packages that are shared and hoisted from the subdirectory packages for consistent versioning.

Note

https://github.com/marketplace/actions/typescript-compiler is the github action we use for tsc. Note that there is a --project parameter that should allow the action to be run from a subdirectory according to docs but I tried it and it didn't work for me. Maybe someone else can get it to work.

Acceptance criteria

The tsc github action is modified such that a job is run for each package that contains a tsconfig.json. The job(s) will no longer run at the root level and any packages installed at the root level to please the github action can now be uninstalled. Or some other intelligent solution is put forward that solves the problems outlined above.

@JMKJR JMKJR added 🐛 Bug This isn't right... 🧠 Good 4 noobs Good for newcomers 🆘 Help Needed Help me pls <3 🌅 QOL Quality of life improvement ⚒️ CI/CD Continuous integration/continuous deployment 🧹 Chore Those pesky little things that don't fit any other tags 🔅 Low Priority Low priority issue and removed 🔅 Low Priority Low priority issue labels Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug This isn't right... 🧹 Chore Those pesky little things that don't fit any other tags ⚒️ CI/CD Continuous integration/continuous deployment 🧠 Good 4 noobs Good for newcomers 🆘 Help Needed Help me pls <3 🌅 QOL Quality of life improvement
Projects
None yet
Development

No branches or pull requests

1 participant