Commit Graph

22 Commits

Author SHA1 Message Date
Priya Gupta f8cf4291c8 Migrate to ESM and upgrade dependencies (#1330)
* Migrate to ESM and upgrade dependencies

* Add ESM migration note to README for V7

* Remove unnecessary devDependencies: ts-node, @types/jest

* npm audit fix

* Upgrade @types/node to version 26.0.0

* Clarify ESM migration details in README for V7

* Update README and dependencies

* Fix lint issue
2026-07-15 11:40:44 -05:00
Priya Gupta ece7cb06ca Fix pip cache error handling on Windows. (#1040)
* Add error handling for Windows 'pip cache dir' execution

* Add comments
2026-06-23 13:01:57 -05:00
Priya Gupta 0cb1a84326 Add RHEL support and include Linux distro in cache keys (#1323)
* Add RHEL support for manifest matching and OS detection

* update dist

* make cache keys distro-aware and key RHEL by major version

* Normalize RHEL OS detection and improve cache key consistency

* Refactor OS info retrieval to use getOSInfo and handle null cases for improved reliability
2026-06-18 18:47:28 -05:00
Zxilly 80b49d3ed8 fix: add arch to cache key (#896)
* fix: add arch to cache key

* test: update tests accordingly
2024-08-07 15:12:32 -05:00
Dmitry Shibanov 03eb867e3d Add error handling for saving and restoring cache (#618) 2023-03-10 12:15:18 +01:00
Ivan ec365b4eba Add and configure ESLint and update configuration for Prettier (#617)
* Add ESLint, update Prettier

* Update docs

* Update tests

* Update licenses

* Fix review points
2023-03-09 12:44:56 +02:00
Evgenii Korolevskii 7b9ef6fc5a Add another pip default dependency file for cache hash (#604) 2023-02-20 13:36:57 +01:00
Oran Avraham 8b89ef08a0 Use correct Poetry config when collecting Poetry projects (#447)
* Use correct Poetry config when collecting Poetry projects

When collecting Poetry projects for caching, a '**/poetry.lock' glob is
used.  However, in order to process the Poetry configuration, the
"poetry" command is run from the repo's root directory; this causes
Poetry to return an invalid configuration when there is a Poetry project
inside an inner directory.

Instead of running a single Poetry command, glob for the same pattern,
and run a Poetry command for every discovered project.

* Fix typo: saveSatetSpy -> saveStateSpy

* poetry: Support same virtualenv appearing in multiple projects

* Add nested Poetry projects test

* poetry: Set up environment for each project individually

* tests/cache-restore: Do not look for dependency files outside `data`

When the default dependency path is used for cache distributors, they
are looking for the dependency file in the project's root (including the
source code), which leads to tests taking a significant amount of time,
especially on Windows runners.  We thus hit sporadic test failures.

Change the test cases such that dependency files are always searched for
inside of `__tests__/data`, ignoring the rest of the project.

* poetry: Simplify `virtualenvs.in-project` boolean check

* README: Explain that poetry might create multiple caches

* poetry: Run `poetry env use` only after cache is loaded

The virtualenv cache might contain invalid entries, such as virtualenvs
built in previous, buggy versions of this action.  The `poetry env use`
command will recreate virtualenvs in case they are invalid, but it has
to be run only *after* the cache is loaded.

Refactor `CacheDistributor` a bit such that the validation (and possible
recreation) of virtualenvs happens only after the cache is loaded.

* poetry: Bump cache primary key
2023-01-03 11:13:00 -05:00
MaksimZhukov 2c3dd9e7e2 Add OS info to the error message (#559) 2022-12-07 18:12:42 +01:00
Dmitry Shibanov 49a521fa06 Fix poetry version (#445) 2022-07-25 15:02:06 +02:00
Milos Pantic 592a7a7a45 Add linux os release info to primary key (#467) 2022-07-19 14:20:19 +02:00
Dmitry Shibanov 3f82819745 Fix output for prerelease version of poetry (#409) 2022-05-31 15:48:54 +02:00
Alexey 21c0493ecf Cache hit output (#373)
* Remove useless await in getCacheDistributor calls

* Added cache-hit output

* Build action with cache-hit output

* Remove PromiseReturnType, add matchedKey == primaryKey check

* Update cache-distributor.ts

* Fix tests and rebuild
2022-04-05 09:57:13 -04:00
Patrick Arminio 6c31eb3fc7 Use \n instead of os.EOL
Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
2022-03-30 22:41:41 +01:00
Patrick Arminio b0c8e3dab7 Remove console.log 2022-03-25 22:53:31 -05:00
Patrick Arminio 42ed863652 Parse values from poetry 2022-03-25 22:53:31 -05:00
Patrick Arminio 1259541ec8 Add tests 2022-03-25 22:53:30 -05:00
Patrick Arminio 95824fd246 Get poetry cache implementation when requested 2022-03-25 22:53:30 -05:00
Patrick Arminio 59cb3f4919 Add untest poetry cache implementation 2022-03-25 22:53:30 -05:00
Dmitry Shibanov 7f80679172 Add fix for Windows caching of pip (#332) 2022-02-04 14:00:41 +03:00
Hugo van Kemenade ba33a692f1 Include Python version in pip cache key (#303) 2022-01-31 13:42:08 +03:00
Dmitry Shibanov 280924fbef Implementation of python's caching (#266) 2021-11-17 13:31:22 +03:00