Reputation: 37
I have two apps that live in the same project.
"start:dev": "nest start --watch",
"start:worker:dev": "nest start --watch --entryFile main-worker",
When we commit to git it run an action to check for code quality, however this only checks the main app.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.18.x
- run: npm install
- run: npm run build
is it possible to specify that npm run build
build the second app as well?
For additional context, the worker app just handles scheduling/queueing of jobs, so rarely run locally.
We had a situation where the main app passed its tests but the worker app was failing silently, we didn't notice until we saw that jobs were not running and ran the worker locally to discover it was failing.
Upvotes: 0
Views: 38
Reputation: 11
You should configure a monorepo that holds both applications, then you run just npm run build in the monorepo and it would run the build in all the apps inside that contains that same script. Check https://turbo.build/
Upvotes: 0