syvita / daoos

A group of tools for anyone to be able to create their own decentralised organisation on Bitcoin. 🟩

Home Page:https://syvita.org/projects/daoos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Typescript Github Action shouldn't run from root directory

JMKJR opened this issue · comments

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.