chore: Install plugin dev dependencies during workflow
This updates the automated generation for github workflows to (also) install the dev dependencies for plugins. This should resolve issues with workflows failing. Or at the very least bring us closer to them working. Shout-out to Jason for the peer pressure :)
This commit is contained in:
parent
3f6be382df
commit
9aef847147
2 changed files with 11 additions and 4 deletions
|
@ -37,7 +37,7 @@ jobs:
|
|||
env:
|
||||
CI: true
|
||||
- name: Install peer & test dependencies
|
||||
run: "cd packages/{{ plugin }} && npm install {{{ peerdeps }}} mocha chai"
|
||||
run: "cd packages/{{ plugin }} && npm install {{{ peerdeps }}} {{{ devdeps }}}"
|
||||
env:
|
||||
CI: true
|
||||
- name: Build plugin
|
||||
|
|
|
@ -462,6 +462,7 @@ function configurePkgUnitTests(type, pkg, config) {
|
|||
const source = path.join(config.repoPath, 'config', 'templates', 'tests', `${type}s`)
|
||||
// Write templates
|
||||
const peerdeps = peerDependencies(pkg, config, type)
|
||||
const devdeps = devDependencies(pkg, config, type)
|
||||
const replace = (type === 'pattern')
|
||||
? {
|
||||
version,
|
||||
|
@ -472,9 +473,15 @@ function configurePkgUnitTests(type, pkg, config) {
|
|||
.join(' ')
|
||||
}
|
||||
: {
|
||||
version,
|
||||
plugin: pkg,
|
||||
Plugin: capitalize(pkg),
|
||||
version,
|
||||
plugin: pkg,
|
||||
Plugin: capitalize(pkg),
|
||||
peerdeps: Object.keys(peerdeps)
|
||||
.map((dep) => dep + '@' + peerdeps[dep])
|
||||
.join(' '),
|
||||
devdeps: Object.keys(devdeps)
|
||||
.map((dep) => dep + '@' + devdeps[dep])
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
for (const file of ['shared.test.mjs']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue