Skip to content

Commit

Permalink
Merge pull request #1378 from jazzband/maintenance/gha-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Apr 21, 2021
2 parents d6e1f9f + 4fcb406 commit 44ed2da
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,30 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Log python version info (${{ matrix.python-version }})
run: python --version --version
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install test dependencies
run: python -m pip install -U tox virtualenv
- name: Prepare test environment
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install test dependencies
run: python -m pip install -U tox virtualenv
- name: Prepare test environment
Expand Down Expand Up @@ -65,6 +89,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install tox
run: pip install tox
- name: Prepare test environment
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,30 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Pip cache
uses: actions/cache@v2
with:
path: >-
${{
runner.os == 'Linux' &&
'~/.cache/pip'
|| ''
}}${{
runner.os == 'macOS' &&
'~/Library/Caches/pip'
|| ''
}}${{
runner.os == 'Windows' &&
'~\AppData\Local\pip\Cache'
|| ''
}}
key: >-
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Prepare cache key
id: cache-key
run: echo "::set-output name=sha-256::$(python -VV | sha256sum | cut -d' ' -f1)"
Expand Down

0 comments on commit 44ed2da

Please sign in to comment.