store
store copied to clipboard
🐞[BUG]: Dev publish for master is not succeeding in CI
Affected Package
All packages
Is this a regression?
Yes, it was working here: https://app.circleci.com/pipelines/github/ngxs/store/82/workflows/b8acd766-b5c3-4804-b178-fdf1be0129c6/jobs/26426
And then failed after merging PR #1596: https://app.circleci.com/pipelines/github/ngxs/store/107/workflows/3f8121e2-2075-4f1e-8a84-290bcbaa50e7/jobs/26765
Description
The issue was caused by the upgrade to Angular v9 in PR #1596 The knock-on effect of this upgrade is that when the integration tests run, they run the ivy compiler against the dist folder. This runs NGCC against the dist folder and the npm pre-publish complains about this (that the lib is built with ivy) when we try to publish.
NNB: The other issue is that this failure has been silent for a very long time because the CI run could not recognise this as a failure. This also needs to be resolved.
So, there are two things to fix:
- [ ] CI build should fail if a publish does not succeed (our script should return exit code 1)
- [ ] Integration app should have its own
node-modules
folder and copy the dist files, just like the other integration apps.
🔬 Minimal Reproduction
- Clone the repo
- Build NGXS
- run either
yarn test:ci:integration
oryarn test:ci:integration:ssr
(they both cause the issue) - inspect the files in the
@ngxs/store
folder- they are compiled with ngcc. This should not be done!
🔥 Exception or Error
Cannot publish artefacts after running the integration tests
Environment
n/a
Oh goodness, really not cool bug ((
@splincode @arturovt After Max fixed the hidden publish failure with PR #1778, I pushed a similar fix for the tagged publish (PR #1779) and also skipped the bad integration tests in PR #1780.
The remaining work to resolve this issue is to move the integration test and SSR integration tests into the current integration tests and to enable this to run again in CircleCI. We need to figure out the style of integration test that currently lives in the integrations
folder and how we would combine the integration
folder tests approach into the integration tests in the integrations
folder. ie.
- Do we want to add these tests into the projects for every version or just have one project that does these tests.
- At a future date, when we set up a github actions CI pipeline, we should consider soliciting the help of @LayZeeDK to use his github action to run a common integration tests project against all supported versions of Angular and node.
Since this will be a reasonable amount of work, @splincode are you up for taking this on, or would you like @arturovt to help out?
So, I would like do it)