-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (31 loc) · 925 Bytes
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI
####################################
# Start the job on all push and PR #
####################################
on:
pull_request:
branches: [master, main]
types: [synchronize, opened, reopened, ready_for_review]
push:
branches: [master, main]
jobs:
precommits:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install pre-commit
pre-commit install
- name: Run pre-commits
run: |
pre-commit run --all-files
# pre-commit run --from-ref origin/main --to-ref HEAD
# run: |
# BASE_COMMIT_ID=$(git rev-parse origin/main)
# pre-commit run --from-ref ${{ env.BASE_COMMIT_ID }} --to-ref HEAD