-
Notifications
You must be signed in to change notification settings - Fork 28
42 lines (35 loc) · 997 Bytes
/
pre_commit.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
38
39
40
41
42
name: Run pre-commit
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
jobs:
pre-commit-check:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Configure caching
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: precommit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: |
pip install pre-commit
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Test if pipeline is up-to-date
run: |
pip install click kfp==2.9.0 kfp.kubernetes
make pipeline
git diff --exit-code || (echo "Pipeline is not up-to-date. Please run 'make pipeline' and commit the changes." && exit 1)