1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-11-22 06:26:25 +00:00
Commit graph

8 commits

Author SHA1 Message Date
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
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
IvanZosimov
01408cef88 Update cache-save.ts to support @actions/cache v3.0.0 lib
Made package.json and package-lock.json to use @actions/cache v3.0.0,
updated logic of the cache-save operation and added unit-tests
2022-06-28 15:17:50 +02:00
Vladimir Safonkin
7885ec3539 Rework pipenv caching test (#375)
* Rework python-pipenv-dependencies-caching test

* Update Pipfile.lock hash in the tests

* Rework python-pipenv-dependencies-caching-path test

* Set location for pipenv test

* Remove requests package from tests

* Test pipenv without caching

* Enable pipenv cache
2022-04-04 09:12:24 -04:00
Patrick Arminio
aac0ef93ba
Build and format 2022-03-25 22:54:10 -05:00
Patrick Arminio
7c950ebdca
Add more tests 2022-03-25 22:53:30 -05:00
Dmitry Shibanov
280924fbef
Implementation of python's caching (#266) 2021-11-17 13:31:22 +03:00