start-server-and-test icon indicating copy to clipboard operation
start-server-and-test copied to clipboard

When running `yarn ci`, other scripts are run using npm

Open penx opened this issue 5 years ago • 3 comments

Bug report

  • version 1.11.0
  • platform Mac OS X

expected behavior

With the following:

    "scripts": {
        "start-server": "yarn start",
        "test": "mocha e2e-spec.js",
        "ci": "start-server-and-test start-server http://localhost:8080 test"
    }

Running yarn ci should run yarn start-server followed by yarn test

actual behavior

Uses yarn rather than npm:

1: starting server using command "npm run start-server"
and when url "[ 'http://localhost:8080' ]" is responding with HTTP status code 200
running tests using command "npm run test"

If this can't be fixed soon, let me know and I can open a PR to add this workaround in to the docs:

    "scripts": {
        "start-server": "yarn start",
        "test": "mocha e2e-spec.js",
        "ci": "start-server-and-test 'yarn start-server' http://localhost:8080 'yarn test'"
    }

penx avatar Apr 29 '20 20:04 penx

Yeah i won’t have time to get to this, so PR to at least mention the workaround would be nice

Sent from my iPhone

On Apr 29, 2020, at 16:35, Alasdair McLeay [email protected] wrote:

 Is this a bug report or a feature request?

If this is a bug report, please provide as much info as possible

version 1.11.0 platform Mac OS X expected behavior With the following:

"scripts": {
    "start-server": "yarn start",
    "test": "mocha e2e-spec.js",
    "ci": "start-server-and-test start-server http://localhost:8080 test"
}

Running yarn ci should run yarn start-server followed by yarn test

actual behavior Uses yarn rather than npm:

1: starting server using command "npm run start-server" and when url "[ 'http://localhost:8080' ]" is responding with HTTP status code 200 running tests using command "npm run test" If this can't be fixed soon, let me know and I can open a PR to add this workaround in to the docs:

"scripts": {
    "start-server": "npm start",
    "test": "mocha e2e-spec.js",
    "ci": "start-server-and-test 'yarn start-server' http://localhost:8080 'yarn test'"
}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

bahmutov avatar Apr 29 '20 20:04 bahmutov

Should there be a configuration that hints start-server-and-test to use yarn instead of npm by default?

detj avatar May 12 '20 21:05 detj

Should there be a configuration that hints start-server-and-test to use yarn instead of npm by default?

I don't have free time too. Can you add @bahmutov a label such as "PR welcome", "Help wanted", etc... to make it more visible ?

Lyokolux avatar Oct 01 '22 11:10 Lyokolux