github-action icon indicating copy to clipboard operation
github-action copied to clipboard

feat: support different working directory for server

Open alvaromartmart opened this issue 4 years ago • 1 comments

fixes #368

This PR adds a start-working-directory that allows setting a different dir for running the server start command. Useful for when you have a non-node server living in a different working directory than the one used for npm i, etc.

alvaromartmart avatar Sep 27 '21 09:09 alvaromartmart

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 27 '21 09:09 CLAassistant

@MikeMcC399 Do you know if this is still relevant?

jennifer-shehane avatar Jan 19 '24 18:01 jennifer-shehane

@jennifer-shehane

Do you know if this is still relevant?

  • This PR is more than 2 years old and hasn't received any feedback from other users, so I assume that it is not a common requirement, even though it links to the issue https://github.com/cypress-io/github-action/issues/368.

  • There are conflicts in this PR which would need some rework to continue.

  • There are no tests defined to test this PR, so the PR is incomplete in this respect.

  • It would be possible to achieve the same results by starting the server outside of the Cypress GitHub Action, this is explained in the README > Split install and tests

name: E2E
on: push
jobs:
  test:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - name: Install dependencies
        uses: cypress-io/github-action@v6
        with:
          # just perform install
          runTests: false
      - run: yarn lint
      - name: Run e2e tests
        uses: cypress-io/github-action@v6
        with:
          # we have already installed all dependencies above
          install: false
          # Cypress tests and config file are in "e2e" folder
          working-directory: e2e

In the example above yarn lint would be replaced by instructions to start the server in a different directory.

      - run: yarn lint
  • https://github.com/cypress-io/github-action/issues/368#issuecomment-1029270320 noted that another solution may be to define a script which starts the server from a different directory.

  • I suggest to close this PR since there are reasonable alternatives to the PR which require no change to the action. This seems to be the simplest and best course of action.

MikeMcC399 avatar Jan 20 '24 07:01 MikeMcC399

Closing this stale PR for reasons as above.

MikeMcC399 avatar Jan 23 '24 15:01 MikeMcC399