cli
cli copied to clipboard
ci: fix invalid release configuration
So, it does create the GitHub release and tags the commit. But for some reason it skips publishing to NPM. There's a bunch of Skipped package ... because <older-version> already exists ... logs, which I don't understand because they reference a different version (0.29.0) than what's being correctly calculated (0.31.0) in the logs above :confused:
Also, it seems to commit something and not push it (there's no release: ... commit), which causes the subsequent Code PushUp step to error (it looks up the current commit with git log -1). No clue what's happening there.
Originally posted by @matejchalk in https://github.com/code-pushup/cli/issues/591#issuecomment-2025729389
I suspect the first problem is due to using the cached build, which then contains package.json with the previous version. For the missing commit, could this be a missing permission in the Github actions workflow?
Looking at the logs, it appears that the git push step is skipped by nx release.
My bad, in the latest version, Nx logs when pushing to Git, however in the Nx version used by code-pushup, it does not.
Looking at the code used to push to Git during the changelog command, it passes the git remote option, which is set in nx.json or in CLI arguments. Could that be why the commits are not pushed in the actual repository?
I'll try removing it.
After further testing, it became clearer that there were some issues with the step to push commits in the changelog command.
I upgraded to the latest Nx version (18.2.1), and the changes have been pushed correctly. I tried on this branch.
The only changes with this upgrade are related to Vitest, but there are no breaking changes this time :D
- tests fail when no tests file are found => solved with
passWithNoTestsoption - Vitest "cache.dir" is deprecated, use Vite's "cacheDir" instead if you want to change the cache director. Note caches will be written to "cacheDir/vitest" => i did not change this option
Tests were passing on my machine after applying this changes
OK, if updating to Nx 18 helps, then let's do it. Do you want to create a PR? Or do you need some assistance?
OK, if updating to Nx 18 helps, then let's do it. Do you want to create a PR? Or do you need some assistance?
Since the changes were rather small, I combined the upgrade in #595.