1
0
Fork 0

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:
Joost De Cock 2022-01-14 13:08:52 +01:00
parent 3f6be382df
commit 9aef847147
2 changed files with 11 additions and 4 deletions

View file

@ -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

View file

@ -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']) {