Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not find cypress.config.js when using Cypress v10 #568

Closed
alxndr opened this issue Jun 10, 2022 · 13 comments
Closed

does not find cypress.config.js when using Cypress v10 #568

alxndr opened this issue Jun 10, 2022 · 13 comments

Comments

@alxndr
Copy link

alxndr commented Jun 10, 2022

When upgrading to Cypress v10 I saw this error message in CI:

You are attempting to use Cypress with an older config file: cypress.json
When you upgraded to Cypress v10.0 the config file was updated and moved to a new location: cypress.config.js
You may need to update any CLI scripts to ensure that they are referring the new version. This would typically look something like:
"cypress open --config-file=cypress.config.js"
https://on.cypress.io/migration-guide

After I added config-file: cypress.config.js the integration works.

@ChillyBots
Copy link

Adding in the config-file setting for me still doesn't work:

   uses: cypress-io/github-action@v2
   with:
          config-file: cypress.config.ts
          record: true
          parallel: true
          group: 'UI - Chrome'
          install-command: yarn --immutable
          browser: chrome
          headless: true
You are attempting to use Cypress with an older config file: cypress.json
When you upgraded to Cypress v10.0 the config file was updated and moved to a new location: cypress.config.ts
You may need to update any CLI scripts to ensure that they are referring the new version. This would typically look something like:
"cypress open --config-file=cypress.config.ts"

@developer-ocansey
Copy link

@ChillyBots update cypress-io/github-action@v2 to v4.1.0

@alxndr
Copy link
Author

alxndr commented Jun 14, 2022

@developer-ocansey: update cypress-io/github-action@v2 to v4.1.0

This worked for me too, and the new summary looks great! https://github.com/alxndr/almost-dead-net/actions/runs/2496531182

What's the recommended way to be notified of new versions of the action?

Screen Shot 2022-06-14 at 9 23 21 AM

@developer-ocansey
Copy link

@alxndr, maybe watching for new releases via https://github.com/cypress-io/github-action/releases might be helpful.

@zubairkhanshinwari
Copy link

zubairkhanshinwari commented Jun 16, 2022

@developer-ocansey thanks it works for me after change from v2 to v4.1.0

@lgenzelis
Copy link

@ChillyBots update cypress-io/github-action@v2 to v4.1.0

Worked for me! Thanks @developer-ocansey :)

@SirawichDev
Copy link

@ChillyBots update cypress-io/github-action@v2 to v4.1.0

thanks you're my life saver

@esbarila
Copy link

esbarila commented Jul 6, 2022

update cypress-io/github-action@v2 to v4.1.0

silly question, how do I update this?

@developer-ocansey
Copy link

developer-ocansey commented Jul 6, 2022

update cypress-io/github-action@v2 to v4.1.0

silly question, how do I update this?

Not sure how your cypress tests are set up for GitHub actions but Ideally from your project root
.github > workflows > [cypress_test].yaml

You should have this line in jobs > steps

uses: cypress-io/github-action@v[4]

Here is an example of what the file looks like: https://github.com/cypress-io/github-action#basic

@medmoe
Copy link

medmoe commented May 14, 2023

I had the same issue but adding this line config-file: cypress.config.ts fixed the issue and this is the code block:

- name: Run Cypress tests
        uses: cypress-io/github-action@v2
        with:
          config-file: cypress.config.ts
          working-directory: truck_mate_front
          build: npm run build
          start: npm start
          wait-on: 'http://localhost:3000'

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented May 14, 2023

@medmoe

You are using an old version of the action which is not compatible with Cypress 10 and later versions:

- name: Run Cypress tests
        uses: cypress-io/github-action@v2

Your workaround is unnecessary if you use the current version of the action:

- name: Run Cypress tests
        uses: cypress-io/github-action@v5

v2 will be blocked from executing by GitHub at the end of May 2023. See the CHANGELOG. You should update the version of the action which you are using.

@MikeMcC399
Copy link
Collaborator

Hi @alxndr

I looked at your https://github.com/alxndr/almost-dead-net/blob/main/.github/workflows/main.yml and you are using
cypress-io/[email protected]

so although the issue here is solved, your workflow will soon fail. There is a note in the CHANGELOG which says:

Note: GitHub announced their plan to disable save-state and set-output commands by May 31, 2023. This will prevent cypress-io/github-action version v4.2.1, and earlier, running after this date since they use set-output. Affected users should update to using v5 of the cypress-io/github-action action before the deadline.

Unless you have a reason to tie your workflow to a specific minor version and patch version, then I would recommend using simply cypress-io/github-action@v5. See README > Action version.

I suggest anyway to close this issue as the original problem is resolved.

@nagash77 nagash77 self-assigned this May 15, 2023
@nagash77
Copy link
Contributor

Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2023
@nagash77 nagash77 removed their assignment May 22, 2023
eric-notifi added a commit to eric-notifi/notifi-react-example-metamask that referenced this issue Oct 7, 2023
Update cypress.yml. 
- [reference](cypress-io/github-action#568)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants