Skip to content

Commit 1fafa89

Browse files
committed
CI: configure precommit CI test
1 parent 4c87dd7 commit 1fafa89

File tree

3 files changed

+37
-60
lines changed

3 files changed

+37
-60
lines changed

.github/workflows/cd.yml_

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/pre-commit.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: pre-commit
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
# pull requests are a duplicate of a branch push if within the same repo.
11+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
12+
13+
name: Check code style
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
defaults:
18+
run:
19+
shell: bash -l {0}
20+
21+
steps:
22+
- name: Checkout the branch
23+
uses: actions/checkout@v3
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: 3.13
29+
30+
- name: Install dev dependencies
31+
run: |
32+
set -vxeuo pipefail
33+
pip install .[dev]
34+
python -m pip list
35+
36+
- name: Run pre-commit
37+
run: pre-commit run --all-files

0 commit comments

Comments
 (0)