Skip to content

Commit

Permalink
pre-commit workflow (#90)
Browse files Browse the repository at this point in the history
* pre-commit workflow

* bring in pyyaml

* renovate once a move for pre-commit
  • Loading branch information
tschm authored Jan 31, 2025
1 parent adcdaa3 commit 0bcef15
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 26 deletions.
44 changes: 19 additions & 25 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,30 @@
"config:recommended"
],
"automerge": true,
"ignorePaths": [
"**/.python-version"
],
"lockFileMaintenance": {
"enabled": true
"enabled": true,
"schedule": [
"on friday before 3pm"
]
},
"pre-commit": {
"enabled": true
"enabled": true,
"schedule": [
"on the first day of the month before 6am"
],
"packageRules": [
{
"groupName": "pre-commit hooks",
"groupSlug": "pre-commit",
"labels": [
"pre-commit",
"dependencies"
],
"matchDepTypes": ["repository"]
}
]
},
"schedule": [
"on friday",
"before 8am"
],
"labels": [
"renovate"
],
"packageRules": [
{
"groupName": "pre-commit hooks",
"matchManagers": [
"pre-commit"
],
"matchDepTypes": [
"repository"
],
"groupSlug": "precommit",
"labels": [
"pre-commit",
"dependencies"
]
}
]
}
46 changes: 46 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: pre-commit

on:
push:

permissions:
checks: write
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/[email protected]
with:
source-folder: src/cradle
tests-folder: src/tests

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
files: artifacts/tests/coverage/coverage.info
format: lcov

deptry:
runs-on: ubuntu-latest
steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/[email protected]
with:
source-folder: src/cradle

pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4

- uses: pre-commit/[email protected]
with:
extra_args: '--verbose --all-files'
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ dependencies = [
"copier>=9.3.1",
"questionary>=2.0.1",
"loguru>=0.7.2",
"fire>=0.7.0"
"fire>=0.7.0",
"pyyaml>=6.0.2",
]

[project.urls]
Expand Down
2 changes: 2 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0bcef15

Please sign in to comment.