Giter Club home page Giter Club logo

Comments (7)

brandonb927 avatar brandonb927 commented on July 30, 2024 2

Azure DevOps Pipeline caching came out of preview the other day. It would be great to have an example of how to cache the Cypress binary in YAML Pipelines, as I am currently struggling to make it work.

from cypress-example-kitchensink.

bahmutov avatar bahmutov commented on July 30, 2024 1

More details suggested by other MVPs

Seems Azure CI team is working on general caching solution, might make sense to wait for them

from cypress-example-kitchensink.

the-serious-programmer avatar the-serious-programmer commented on July 30, 2024 1

I know I am late to the party, but a small improvement on @ekulabuhov post:
Instead of hard coding the path you can also use path: $(LOCALAPPDATA)/Cypress, also see this

from cypress-example-kitchensink.

bahmutov avatar bahmutov commented on July 30, 2024

from cypress-example-kitchensink.

bahmutov avatar bahmutov commented on July 30, 2024

Sample project: https://github.com/MicrosoftDocs/pipelines-javascript but does not show any caching for node_modules or ~/.npm folders

from cypress-example-kitchensink.

bahmutov avatar bahmutov commented on July 30, 2024

🎉 This issue has been resolved in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from cypress-example-kitchensink.

ekulabuhov avatar ekulabuhov commented on July 30, 2024

Hi! It might be useful to add that on a windows based image the path is different and looks like this:

- task: CacheBeta@1
  inputs:
    key: 'cypress | $(Agent.OS) | package-lock.json'
    path: 'C:\Users\VssAdministrator\AppData\Local\Cypress'
    restoreKeys: 'cypress | $(Agent.OS) | package-lock.json'
  displayName: Cache cypress binary

Unfortunately, caching in Azure Pipelines is a bit crippled due to security restrictions described here: https://docs.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops#cache-isolation-and-security

Basically, caches are isolated between different branches which makes them less useful when used with short lived feature branches.

from cypress-example-kitchensink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.