Commit 65ab92de by Sébastien Eustace Committed by GitHub

Fix GitHub actions cache issues on develop (#1918)

* Fix Github actions cache issues

* Fix Github Actions cache issues (#1928)
parent f797e172
...@@ -30,6 +30,10 @@ jobs: ...@@ -30,6 +30,10 @@ jobs:
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Install and set up Poetry - name: Install and set up Poetry
run: | run: |
python get-poetry.py --preview -y python get-poetry.py --preview -y
...@@ -39,7 +43,7 @@ jobs: ...@@ -39,7 +43,7 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: .venv path: .venv
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies - name: Install dependencies
run: | run: |
source $HOME/.poetry/env source $HOME/.poetry/env
...@@ -62,6 +66,10 @@ jobs: ...@@ -62,6 +66,10 @@ jobs:
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Install and set up Poetry - name: Install and set up Poetry
run: | run: |
python get-poetry.py --preview -y python get-poetry.py --preview -y
...@@ -71,7 +79,7 @@ jobs: ...@@ -71,7 +79,7 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: .venv path: .venv
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies - name: Install dependencies
run: | run: |
source $HOME/.poetry/env source $HOME/.poetry/env
...@@ -94,6 +102,11 @@ jobs: ...@@ -94,6 +102,11 @@ jobs:
uses: actions/setup-python@v1 uses: actions/setup-python@v1
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Get full python version
id: full-python-version
shell: bash
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Install and setup Poetry - name: Install and setup Poetry
run: | run: |
python get-poetry.py --preview -y python get-poetry.py --preview -y
...@@ -103,7 +116,7 @@ jobs: ...@@ -103,7 +116,7 @@ jobs:
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: .venv path: .venv
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies - name: Install dependencies
run: | run: |
$env:Path += ";$env:Userprofile\.poetry\bin" $env:Path += ";$env:Userprofile\.poetry\bin"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment