From 35c50dce0eee39c4f58074a4996bfbddeccebe57 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 15 Mar 2022 17:12:50 -0700 Subject: [PATCH] Upgrade to `setup-python` v3 and use caching for GHA (#521) Also run Prettier across the edited files. --- .github/workflows/docs.yml | 27 ++++++++++++++------------- .github/workflows/lint.yml | 6 ++++-- .github/workflows/test.yml | 3 ++- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1cfa6ecc9..32488a3e3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,11 +4,11 @@ on: pull_request: paths: - ".github/workflows/docs.yml" - - 'docs/**' + - "docs/**" push: paths: - ".github/workflows/docs.yml" - - 'docs/**' + - "docs/**" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} @@ -20,17 +20,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: '3.9' + - uses: actions/setup-python@v3 + name: Install Python + with: + python-version: "3.9" + cache: "pip" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade nox + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade nox - - name: Build documentation - run: python -m nox -s docs + - name: Build documentation + run: python -m nox -s docs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b2c650ba2..fbb6b06c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,10 +22,11 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" + cache: "pip" - name: Install dependencies run: | @@ -47,10 +48,11 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v3 name: Install Python with: python-version: "3.9" + cache: 'pip' - name: Install dependencies run: python -m pip install --upgrade build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0cb45cf23..943046367 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,10 +28,11 @@ jobs: steps: - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v3 name: Install Python ${{ matrix.python_version }} with: python-version: ${{ matrix.python_version }} + cache: "pip" - name: Install dependencies run: |