Fix CI error in compatibility tests (#377)

This commit is contained in:
Aria 2023-01-12 14:43:44 +02:00 committed by GitHub
parent fa72c5ba5d
commit 80e79499df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 19 deletions

View file

@ -9,7 +9,9 @@ import onCleanup from 'node-cleanup'
import * as verdaccioPackage from 'verdaccio'
import {chromium, devices} from 'playwright'
if (!argv['verbose']) {
const verbose = !!argv['verbose']
if (!verbose) {
$.verbose = false
console.log(
'Running in quiet mode. Add --verbose to see the output of all commands.',
@ -82,7 +84,9 @@ async function runNpmInstallOnTestPackages() {
cd(pathToPackageDir)
try {
console.log('Running npm install on ' + pathToPackageDir + '...')
await $`npm install --registry ${config.VERDACCIO_URL} --loglevel error --fund false`
await $`npm install --registry ${config.VERDACCIO_URL} --loglevel ${
verbose ? 'warn' : 'error'
} --fund false`
} catch (error) {
console.error(`Failed to install dependencies for ${pathToPackageDir}
Try running \`npm install\` in that directory manually via:
@ -168,6 +172,10 @@ const startVerdaccio = (port) => {
),
}
if (verbose) {
config.logs.level = 'warn'
}
const onReady = (webServer) => {
webServer.listen(port, () => {
resolved = true