Merge pull request #10 from jepler/update-black-ci-etc

Update pre-commit & build
This commit is contained in:
Jeff Epler 2022-02-15 16:46:19 -06:00 committed by GitHub
commit 2aeae70edf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 25 deletions

View file

@ -22,10 +22,10 @@ jobs:
awk -F '\/' '{ print tolower($2) }' |
tr '_' '-'
)
- name: Set up Python 3.7
- name: Set up Python 3.x
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.x
- name: Versions
run: |
python3 --version
@ -42,11 +42,16 @@ jobs:
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
run: |
source actions-ci/install.sh
- name: Pip install Sphinx
- name: Pip install pylint, Sphinx, pre-commit
run: |
pip install --force-reinstall Sphinx sphinx-rtd-theme sphinx-autoapi
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit sphinx-autoapi
- name: Library version
run: git describe --dirty --always --tags
- name: Setup problem matchers
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
- name: Pre-commit hooks
run: |
pre-commit run --all-files
- name: Clone and build circuitpython unix port
run: |
set -e

View file

@ -1,21 +0,0 @@
# SPDX-FileCopyrightText: Copyright (c) 2019 Anthony Sottile
#
# SPDX-License-Identifier: MIT
name: pre-commit
on: [pull_request, push]
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- name: set PY
run: echo >>$GITHUB_ENV "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v1.1.0