-
Notifications
You must be signed in to change notification settings - Fork 347
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
Allow disabling cache #953
Comments
Could you please share some more information?
env:
DEBUG: '@cypress/github-action' The CI examples here all run on GitHub-hosted runners, so we only have timings available for these standard runners. |
Of course :)
We're on ubuntu-latest (22.04), using the same image as the official Github runners.
Github: ~4 seconds
PS: if you want to know if a runner executed on our self hosted or github official, you can check the |
@skjnldsv This is a feature request, so the Cypress.io team would need to weigh in on the request to allow optional disabling of caching. I read in the GitHub documentation Caching dependencies to speed up workflows: "When using self-hosted runners, caches from workflow runs are stored on GitHub-owned cloud storage. A customer-owned storage solution is only available with GitHub Enterprise Server." which probably contributes to generally longer run times for caching on self-hosted runners. |
If you look at the article from https://buildjet.com/for-github-actions/blog/launch-buildjet-cache as well as the issue here actions/cache#720, you'll see this is more of an issue with azure than else. But this is also not really your call. Thus me only asking for a way to disable the cache. |
Any news @MikeMcC399 ? |
There is no new status on your enhancement request.
As a flexible alternative to using the In these up-to-date example workflows the caching is set up in the workflows themselves, so the caching could be removed / commented out or could be replaced by the buildjet/cache you suggested. The workflows run under GitHub Actions and run Cypress from the CLI instead of using the Cypress Module API. These workflows have no dependency on |
Hi there, Ideally this would be a I don't mind trying to bring a PR if you'd be open to reviewing and considering merging it |
Thank you for your feedback! It is good to hear that it is useful to you!
It is not necessary to modify the action to achieve your results. You can set For instance here is a modified workflow taken from https://github.com/cypress-io/cypress-example-kitchensink/blob/master/.github/workflows/chrome.yml name: Chrome
on: [push, workflow_dispatch]
jobs:
chrome:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Install dependencies
run: npm ci
- name: Chrome
uses: cypress-io/github-action@v6
timeout-minutes: 10
with:
install: false
build: npm run build
start: npm start
browser: chrome Surprisingly, not using cache on GitHub Actions does not notably change the run-time of the workflow. I suspect that GitHub Actions may be using proxy servers or similar to cache downloads.
|
@MikeMcC399 that was indeed exactly what I wanted! Thank you for the guidance, it worked perfectly 🚀 |
It's good to know that this worked for you! Thanks for your reply! |
Hi,
Because of that issue: actions/cache#720, the cypress action step takes a very long time on self-hosted runners. The difference is so big that disabling the cache is faster.
Alternatively, you could consider migrating to the buildjet/cache action, or push forward for Github to fix actions/cache#720
Thanks :)
The text was updated successfully, but these errors were encountered: