Conversation
8993c8b to
2df4f7f
Compare
|
I'm starting to wonder how to properly install NPM for plugins, as well as how to make sure there is caching in place for it. |
f10dbad to
9371c59
Compare
|
That appears to work. Anything else we should do here? Do you want to apply the same matrix style testing of multiple jobs that we apply in core? |
|
That's a good question I have no definitive answer for. I guess it'd be a good idea to run test:$plugin, assets:precompile[$plugin] and db:seed. For the later we have a separate job, but Leos' is right we should test both paths, all migrations in one go, and foreman first, then plugin. So maybe those three as a matrix and the current separate one kept separate? |
This only happens if package.json exists.
ca9f637 to
baa47f7
Compare
| - name: "Compile webpack" | ||
| if: ${{ hashFiles(format('{0}/package.json', inputs.plugin)) != '' && contains(matrix.task, 'test') }} | ||
| run: | ||
| bundle exec rake webpack:compile |
There was a problem hiding this comment.
IMHO, if test:$plugin depends on webpack (because it contains integration tests), it should depend on that itself via Rake, and not make us do this hack, but 🤷♀️
There was a problem hiding this comment.
You could argue that it can make it painful for developers. If you have webpack running then you don't need to compile, but we can't detect this. So I can accept this now. Perhaps after we merge webpack 5 we can be a bit smarter and introduce some task that only compiles if some file doesn't exist.
|
I can't approve since it's my own PR, so let's try this out by me merging it. |
This only happens if package.json exists.
Opening, but needs test cases.
foreman_ansiblehaspackage.json, butforeman_expire_hostsdoesn't.