Skip to content

Commit

Permalink
Add act, upgrade actions to py 3.12
Browse files Browse the repository at this point in the history
Signed-off-by: John Strunk <[email protected]>
  • Loading branch information
JohnStrunk committed Apr 3, 2024
1 parent 4e03940 commit 884f0f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2.10.2": {},
"ghcr.io/devcontainers/features/github-cli:1.0.11": {},
"ghcr.io/devcontainers/features/node:1.4.1": {},
"ghcr.io/devcontainers-contrib/features/act:1.0.14": {},
"ghcr.io/devcontainers-contrib/features/pipenv:2.0.17": {},
"ghcr.io/devcontainers-contrib/features/pre-commit:2.0.17": {}
},
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,26 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up Python
id: py-pc
id: setup-py
# https://github.com/actions/setup-python
# yamllint disable-line rule:line-length
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: "3.11"
python-version: "3.12"

- name: Enable cache for pre-commit hooks
# https://github.com/actions/cache
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
with:
path: ~/.cache/pre-commit
# yamllint disable-line rule:line-length
key: pre-commit|${{ steps.py-pc.outputs.python-version}}|${{ hashFiles('.pre-commit-config.yaml') }}
key: pre-commit|${{ steps.setup-py.outputs.python-version}}|${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit|${{ steps.py-pc.outputs.python-version}}|
pre-commit|${{ steps.setup-py.outputs.python-version}}|
pre-commit|
- name: Install pre-commit
run: |
pip install --upgrade pre-commit
pre-commit --version
- name: Run pre-commit checks
run: pre-commit run -a
run: pipx run pre-commit run -a

- name: Run pre-commit gc
run: pre-commit gc
run: pipx run pre-commit gc

0 comments on commit 884f0f0

Please sign in to comment.