Skip to content

Commit

Permalink
Merge pull request #120 from computerlyrik/dependabot-updates
Browse files Browse the repository at this point in the history
Update GHA and pre-commit
  • Loading branch information
maresb authored Apr 21, 2024
2 parents 3dd2ec0 + e7285f6 commit 6ad3107
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/pre-commit-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Perform pre-commit checks

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
# Initialization
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8

# Cache
- name: Load pre-commit hooks cache
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-checks-hooks-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}

# Install and run pre-commit
- name: Install pre-commit
run: python -m pip install pre-commit
- name: List package versions
run: python -m pip freeze --local
- name: RUN PRE-COMMIT
run: SKIP=no-commit-to-branch pre-commit run --show-diff-on-failure --color=always --all-files
4 changes: 2 additions & 2 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Build
Expand All @@ -24,7 +24,7 @@ jobs:
run: |
python -m twine check dist/*
- name: Publish
uses: pypa/[email protected].11
uses: pypa/[email protected].14
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: no-commit-to-branch
args: [--branch, master, --branch, main]
Expand All @@ -18,25 +18,25 @@ repos:
args: ['--fix=lf']

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: ["--py38-plus", "--keep-runtime-typing"]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--settings-path=pyproject.toml"]

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.4.0
hooks:
- id: black
language_version: python3

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
args:
Expand Down

0 comments on commit 6ad3107

Please sign in to comment.