Skip to content

Commit 6268b99

Browse files
committed
CI: Add pre-commit
Signed-off-by: Andrej Orsula <[email protected]>
1 parent 2bc9a43 commit 6268b99

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/pre-commit.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: pre-commit
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
13+
cancel-in-progress: true
14+
15+
env:
16+
PYTHON_VERSION: "3.10"
17+
18+
jobs:
19+
pre-commit:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ env.PYTHON_VERSION }}
26+
27+
## Run pre-commit and try to apply fixes
28+
- name: Run pre-commit
29+
uses: pre-commit/[email protected]
30+
- name: Apply fixes from pre-commit
31+
uses: pre-commit-ci/[email protected]
32+
if: always()

0 commit comments

Comments
 (0)