Skip to content

Commit

Permalink
feat(ci): enable pip caching in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
SauravMaheshkar authored and brandonwillard committed Apr 8, 2023
1 parent 9940550 commit 1275914
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dev-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies and customize pyproject.toml
run: |
# Download dasel to modify pyproject.toml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.8"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Build the sdist and the wheel
run: |
python -m pip install -U pip
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ jobs:
runs-on: ubuntu-latest
if: ${{ needs.changes.outputs.changes == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: "pyproject.toml"
- uses: pre-commit/action@v3.0.0

test:
name: "Test py${{ matrix.python-version }}: ${{ matrix.part }}"
Expand Down Expand Up @@ -231,6 +233,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.7
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/update-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
cache: "pip"
cache-dependency-path: "pyproject.toml"

- uses: browniebroke/pre-commit-autoupdate-action@main

Expand Down

0 comments on commit 1275914

Please sign in to comment.