From 754d94374b1fbebb77400cdd0d763aaa587f4740 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 21 Nov 2021 17:44:49 +0200 Subject: [PATCH] Use actions/setup-python's pip cache --- .editorconfig | 1 - .github/release-drafter.yml | 1 - .github/workflows/deploy.yml | 10 ++-------- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 17 ++--------------- 5 files changed, 5 insertions(+), 26 deletions(-) diff --git a/.editorconfig b/.editorconfig index b71c07e..179fd45 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,7 +11,6 @@ charset = utf-8 [*.py] indent_size = 4 indent_style = space - trim_trailing_whitespace = true # Two-space indentation diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index b853342..67eccf9 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -23,7 +23,6 @@ exclude-labels: - "changelog: skip" template: | - $CHANGES version-resolver: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9b4297e..627be8b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,18 +19,12 @@ jobs: with: fetch-depth: 0 - - name: Cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: deploy-${{ hashFiles('**/setup.py') }} - restore-keys: | - deploy- - - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.10" + cache: pip + cache-dependency-path: "setup.py" - name: Install dependencies run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bfe362b..769ea4e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 + - uses: pre-commit/action@v2.0.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 130a0a0..ba3aaf0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,21 +24,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ - hashFiles('**/setup.py') }} - restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}-v1- + cache: pip + cache-dependency-path: "setup.py" - name: Install dependencies run: |