Skip to content

Commit

Permalink
Merge pull request #387 from jenshnielsen/cache_upgrade
Browse files Browse the repository at this point in the history
Use caching step from setup-python action
  • Loading branch information
jenshnielsen authored Nov 2, 2022
2 parents a9c6adb + 087531f commit a4bbbd6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 38 deletions.
17 changes: 0 additions & 17 deletions .github/actions/prepare-cache-pip/action.yml

This file was deleted.

18 changes: 7 additions & 11 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,13 @@ jobs:
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
- name: prepare pip cache
id: prepare-cache-pip
uses: ./.github/actions/prepare-cache-pip
- name: pip cache
uses: actions/cache@v3.0.11
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: upgrade pip setuptools wheel
run: python -m pip install --upgrade pip setuptools wheel
shell: bash
- name: install broadbean & docs dependencies
run: |
pip install -c requirements.txt .[docs,test]
Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ jobs:
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}
- name: prepare pip cache
id: prepare-cache-pip
uses: ./.github/actions/prepare-cache-pip
- name: pip cache
uses: actions/cache@v3.0.11
with:
path: ${{ steps.prepare-cache-pip.outputs.cache-dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: upgrade pip setuptools wheel
run: python -m pip install --upgrade pip setuptools wheel
shell: bash
- name: install broadbean with test dependencies
run: |
pip install .[test] -c requirements.txt
Expand Down

0 comments on commit a4bbbd6

Please sign in to comment.