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

config parameter not passed from action to runner

Open huy-nguyen opened this issue 3 years ago • 1 comments

I was running the action with the following setting but the defaultCommandTimeout config was not passed from the action to the runner:

      - name: Run Cypress
        uses: cypress-io/github-action@v2
        with:
          install: false
          start: yarn workspace api start, yarn workspace main-ui serve
          wait-on: "http://localhost:4000/healthcheck, http://localhost:3000"
          command: yarn workspace main-ui cy:run
          config: defaultCommandTimeout=20000

However, setting that value via environment variable works:

      - name: Run Cypress
        uses: cypress-io/github-action@v2
        env:
          CYPRESS_DEFAULT_COMMAND_TIMEOUT: 20000
        with:
          install: false
          start: yarn workspace api start, yarn workspace main-ui serve
          wait-on: "http://localhost:4000/healthcheck, http://localhost:3000"
          command: yarn workspace main-ui cy:run

huy-nguyen avatar Jan 07 '22 11:01 huy-nguyen

Encountered the same problem. Same configuration failed to be passed via the action, while successfully worked with cypress configuration-file.

I was trying to set screenshotOnRunFailure false via the action.

ArktinenSieni avatar Jun 13 '22 08:06 ArktinenSieni

@huy-nguyen

It looks like you ran into an issue which was not previously documented.

If you use the command parameter it overrides many other functions. See README > Custom test command:

Caution: using the action parameter command causes multiple other parameters to be ignored including: auto-cancel-after-failures, browser, ci-build-id, command-prefix, component, config, config-file, env, group, headed, parallel, project, publish-summary, quiet, record, spec and tag.

I suggest to close this issue as it is now explained.

MikeMcC399 avatar Nov 06 '23 15:11 MikeMcC399

Closing, since this is a stale inactive issue and a probable cause has been identified.

MikeMcC399 avatar Nov 09 '23 11:11 MikeMcC399