From 65ab92dec6ae618bab539cd9bdc2df28d3f73e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Tue, 21 Jan 2020 22:45:14 +0100 Subject: [PATCH] Fix GitHub actions cache issues on develop (#1918) * Fix Github actions cache issues * Fix Github Actions cache issues (#1928) --- .github/workflows/main.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0167d8f660a..fd09899b96d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,10 @@ jobs: uses: actions/setup-python@v1 with: 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 run: | python get-poetry.py --preview -y @@ -39,7 +43,7 @@ jobs: uses: actions/cache@v1 with: 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 run: | source $HOME/.poetry/env @@ -62,6 +66,10 @@ jobs: uses: actions/setup-python@v1 with: 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 run: | python get-poetry.py --preview -y @@ -71,7 +79,7 @@ jobs: uses: actions/cache@v1 with: 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 run: | source $HOME/.poetry/env @@ -94,6 +102,11 @@ jobs: uses: actions/setup-python@v1 with: 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 run: | python get-poetry.py --preview -y @@ -103,7 +116,7 @@ jobs: uses: actions/cache@v1 with: 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 run: | $env:Path += ";$env:Userprofile\.poetry\bin"