Commit Graph

73 Commits (824f444748569f93d82ec108e631201bd1f3b9de)

Author SHA1 Message Date
Ashwin Sangem 7799d864d9
Updated the usage and docs to the major version release. (#770) 3 years ago
Vipul deae296ab3
Merge pull request #651 from magnetikonline/fix-golang-windows-example
Fix Golang windows example - updated `README.md` test badge markdown.
3 years ago
Vipul c7c46bcb6d
Merge pull request #707 from duxtland/main
Add Deno cache example
3 years ago
Peter Mescalchin 6535c5fb5f Regenerated `examples.md` TOC 3 years ago
Peter Mescalchin 341e6d75d9
Merge branch 'actions:main' into fix-golang-windows-example 3 years ago
Vipul ab4bea262c
Merge pull request #567 from yuichkun/fix-typo-in-lerna-example
Fix typo of cache path in Lerna example
3 years ago
Yuichi Yogo 7772fcab79 remove unnecessary sub directory from search path 3 years ago
Malo Bourgon 2c7b30f330 Add example for Haskell Stack 3 years ago
Jheyson Saavedra de7c17c6a9
chore: add Deno cache example 3 years ago
Joachim Breitner c64c5261d3
Fix syntax 3 years ago
Joachim Breitner 4e8aa1cc93
Improve Haskell example
as proposed in https://github.com/actions/cache/issues/555
3 years ago
Manuel Roth 67b6d52d50
(R renv) Remove unused renv-cache-path variable (#663) 3 years ago
Manuel Roth 92f67a4829
(R renv) Fix Renv package cache location in examples (#660)
* (R renv) Fix Renv package cache location in examples

* (R env) Update getting Renv package cache location

* (R env) Set renv package cache location using RENV_PATHS_ROOT environment variable
3 years ago
Peter Mescalchin 447f0fd1d3 Chomp some markdown whitespace 3 years ago
Peter Mescalchin 795a8f09a9 Fixed Windows Golang cache paths in example 3 years ago
andrewdotn 5807af2642
Fix bugs in example of how to use with pipenv (#607)
* Fix bugs in example of how to use with pipenv

The current example of how to use `@actions/cache` with pipenv has two
problems:

 1. The cached virtualenv that pipenv creates has `bin/python` as a symlink
    into paths like `/opt/hostedtoolcache/Python/3.7.11` that explicitly
    include the patch version of python. When the cache is restored onto a
    machine running a slightly different version of python, e.g., when
    GitHub upgrades its runners from python 3.7.10 to 3.7.11, then any
    attempt to run python in the workflow mysteriously fails with errors
    like `Failed to load paths: /bin/sh: 1: /home/runner/.local/share/virtualenvs/myrepo-sOIMCiTO/bin/python: not found`.

    Therefore the patch version of python should be included in the cache
    key.

 2. `pipenv --install` has the unfortunate behaviour of not cleaning out
    any pre-existing packages. That is, if the `Pipfile` first contains
    dependencies on `foo` and `bar`, and then you remove `bar` from the
    `Pipfile` and run `pipenv install` again, `bar` is still included in
    the virtualenv.

    This can cause false-positive test failures: when a dependency is
    removed from the `Pipfile` but there is still code that relies on the
    removed dependency, tests can still pass if the dependency comes from
    the cache based on a previous revision of `Pipfile.lock`.

    Therefore `restore-keys` should not be set.

This PR attempts to address both of these issues.

* Explain why setup-python is included in example
3 years ago
Peter Mescalchin 0638051e9a
Golang example tweak - add `go-build` path - rebuild page TOC (#577) 4 years ago
Alex Tokarev cc2d767a72
Update Rust directories recommended for caching (#433)
This commit applies the suggestion from The Cargo Book:
https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
4 years ago
Daniel Kuschny 2fa955d825
Update examples.md (#588)
Extend gradle notes.
4 years ago
Yuichi Yogo 4762de4681 simplify path in lerna example 4 years ago
kalin 3a696372f2
elixir typo - stray parenthesis (#569) 4 years ago
Wojtek Mach 366e5ba022
Update cache key for Elixir (#568) 4 years ago
Yuichi Yogo 12ed05f49a Fix typo of cache path in Lerna example 4 years ago
Jonathan Clem 981fa981ed
Merge pull request #469 from ericmj/patch-1
Also cache _build for Elixir
4 years ago
Pradyun Gedam 4498c5b4d8
Drop the example based on using pip's internals (#519)
pip's documentation explicitly states to not use `import pip`:

> While it is implemented in Python, and so is available from your Python code via
> `import pip`, you must not use pip’s internal APIs in this way.

This example is in direct contradiction with the documentation's guidance and, thus, has
been removed.
4 years ago
Benoit Daloze 1bfe3accb3 Recommend ruby/setup-ruby's bundler-cache: true option
Manually caching gems has many issues:
* Not working if there is no Gemfile.lock but only a Gemfile
* Not having the OS version in the key, which might cause binary incompatibility with system libraries of different ABI version.
* Not taking the Ruby version in account.
* Not taking the Ruby ABI version of development builds into accounts, which cannot be done with a key, but needs the commit hash.
* Using restore-keys would grow the cache over time and have extra gems in the cache.
* Those reasons are summarized in https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby#caching-bundle-install-manually
4 years ago
Konrad Pabjan 354332455a
Merge pull request #434 from DanielHabenicht/patch-1
Update examples.md for NPM
4 years ago
Odín del Río e64ab303d1
Improved gradle cache key calculation example 4 years ago
Chris Patterson 72f66cfa6d
Added a cache example when using matrix 4 years ago
Eric Meadows-Jönsson 62a4d75442
Also cache _build for Elixir 4 years ago
Guillermo Eijo 4557c6a937 Add example for python pipenv 4 years ago
DanielHabenicht 19530ba135
Update examples.md 4 years ago
Shafiq Jetha 8b407f7777
Grammar fix (#405) 4 years ago
Noam Tamim 59a8d125e7
Fix indentation in last pip example 4 years ago
Aiqiao Yan 4978dc4f31
Merge pull request #358 from gaerfield/patch-1
fixes actions/cache#244
5 years ago
Aiqiao Yan 5c77066753
Merge pull request #359 from JLHwung/patch-1
add Yarn 2 cache example
5 years ago
Aiqiao Yan 4aa79d91d3 Rename master to main 5 years ago
Huáng Jùnliàng 5474af707f
add Yarn 2 cache example 5 years ago
gaerfield 591646a21e
fixes actions/cache#244 5 years ago
Marcono1234 eed9cfe64d
Add name for Maven example (#341) 5 years ago
Josh Gross 984ce638f0
Add note about using setup-node before cache (#351) 5 years ago
Aiqiao Yan e6c708b5ce React to feedback 5 years ago
Aiqiao Yan 581312be20 Update readme and examples to use v2 5 years ago
Shigeki Karita ddc4681e8d
Add D example. (#303) 5 years ago
Hugo van Kemenade ccf9619480
Add Python example using 'pip cache dir' to get cache location (#285)
* Fix existing example

* Add Python example using 'pip cache dir' to get cache location

* Let users decide how they install pip 20.1+
5 years ago
Josh Gross f60097cd16
Fix Lerna Example (#242)
* Fix lerna example

* Fix yaml spacing
5 years ago
Ethan Dennis eb78578266
Cache multiple paths and add glob pattern support (#212)
* Allow for multiple line-delimited paths to cache

* Add initial minimatch support

* Use @actions/glob for pattern matching

* Cache multiple entries using --files-from tar input

remove known failing test

Quote tar paths

Add salt to test cache

Try reading input files from manifest

bump salt

Run test on macos

more testing

Run caching tests on 3 platforms

Run tests on self-hosted

Apparently cant reference hosted runners by name

Bump salt

wait for some time after save

more timing out

smarter waiting

Cache in tmp dir that won't be deleted

Use child_process instead of actions/exec

Revert tempDir hack

bump salt

more logging

More console logging

Use filepath to with cacheHttpClient

Test cache restoration

Revert temp dir hack

debug logging

clean up cache.yml testing

Bump salt

change debug output

build actions

* unit test coverage for caching multiple dirs

* Ensure there's a locateable test folder at homedir

* Clean up code

* Version cache with all inputs

* Unit test getCacheVersion

* Include keys in getCacheEntry request

* Clean import orders

* Use fs promises in actionUtils tests

* Update import order for to fix linter errors

* Fix remaining linter error

* Remove platform-specific test code

* Add lerna example for caching multiple dirs

* Lerna example updated to v2

Co-Authored-By: Josh Gross <joshmgross@github.com>

Co-authored-by: Josh Gross <joshmgross@github.com>
5 years ago
Dylan Musil 22d71e33ad
Update Node Windows example to find the npm cache (#223) 5 years ago
Jeremy Loy af8651e0c5
Include Kotlinscript Gradle files (#216)
Tested this with my own repo which uses a mix of `build.gradle` and `build.gradle.kts` files and this glob seems to be working correctly.

As an aside, please checkout #215 as it would make the process of verifying these globs easier!
5 years ago
Sacha Ayoun 826785142a
Adding examples for OCaml/esy (#199)
* Adding examples for esy as a workflow for OCaml files

* track v1 instead of v1.1.2

Co-Authored-By: Josh Gross <joshmgross@github.com>

* add link in the readme for ocaml-esy

* ocaml -> ocaml/reason

* link in readme says ocaml/reason

Co-authored-by: Josh Gross <joshmgross@github.com>
5 years ago