Skip to content

Commit

Permalink
Upgrade to setup-python v3 and use caching for GHA (#521)
Browse files Browse the repository at this point in the history
Also run Prettier across the edited files.
  • Loading branch information
brettcannon committed Mar 16, 2022
1 parent aebc072 commit 35c50dc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/docs.yml
Expand Up @@ -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 }}
Expand All @@ -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
6 changes: 4 additions & 2 deletions .github/workflows/lint.yml
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -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: |
Expand Down

0 comments on commit 35c50dc

Please sign in to comment.