ci: fix pip cache issue caused by mixing python versions

pull/1186/head
Erik Sundell 2022-10-08 14:38:27 +02:00
rodzic 77c8ef4adb
commit f3b0e18c0b
1 zmienionych plików z 10 dodań i 4 usunięć

Wyświetl plik

@ -41,11 +41,17 @@ env:
jobs:
pre-commit:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python_version: ["3.9"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "${{ matrix.python_version }}"
# There will almost never be a cache hit on the cache key when this job is
# run, as it is the first of all jobs in this workflow. The subsequent
@ -54,7 +60,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: "${{ github.run_id }}"
key: "${{ github.run_id }}-${{ matrix.python_version }}"
- name: "Install dependencies"
run: |
@ -69,7 +75,7 @@ jobs:
runs-on: ubuntu-${{ matrix.ubuntu_version }}"
strategy:
fail-fast: false # Do not cancel all jobs if one fails
fail-fast: false
matrix:
ubuntu_version: ["22.04"]
python_version: ["3.9"]
@ -102,7 +108,7 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: "${{ github.run_id }}"
key: "${{ github.run_id }}-${{ matrix.python_version }}"
- name: "Install"
run: |