-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache .local for a faster poetry installation (#4328)
* experiment with cached pip cache dir * small change * small change * correct cache keys * small change * small change * exact key * less slang * try this * use --help in example * reuse vitualenv * small sample change * silly * silly * small sample change * possibly skip * small sample change * cache pip cache first * small sample change * debug * debug * ignore snok * small sample change * custom path * print version * --version * print version * try that * small change * unique ids * small change * louder * small change * tidying up * small change * small change
- Loading branch information
Showing
2 changed files
with
19 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,30 +18,31 @@ jobs: | |
with: | ||
python-version: "3.8" | ||
|
||
- name: Install Python poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/[email protected] | ||
with: | ||
path: deployer/.venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/pr-deployer.yml') }} | ||
|
||
- name: Load cached .local | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.local | ||
key: dotlocal-${{ runner.os }}-${{ hashFiles('.github/workflows/pr-deployer.yml') }} | ||
|
||
- name: Install Python poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
|
||
- name: Install deployer | ||
run: | | ||
cd deployer | ||
poetry install | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
|
||
- name: Display Python & Poetry version | ||
run: | | ||
python --version | ||
poetry --version | ||
- name: Lint Python code | ||
run: | | ||
source deployer/.venv/bin/activate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters