forked from kedro-org/kedro-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.33 KB
/
lint.yml
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
43
44
45
46
47
48
name: Run linter
on:
workflow_call:
inputs:
plugin:
type: string
os:
type: string
python-version:
type: string
jobs:
lint:
defaults:
run:
shell: bash
runs-on: ${{ inputs.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Cache python packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{inputs.plugin}}-${{inputs.os}}-python-${{inputs.python-version}}
restore-keys: ${{inputs.plugin}}
- name: Install uv
run: |
python -m pip install "uv==0.2.21"
- name: Install dependencies
run: |
cd ${{ inputs.plugin }}
uv pip install --system "kedro @ git+https://github.com/kedro-org/kedro@main"
uv pip install --system "${{inputs.plugin}}[test] @ ."
uv pip freeze --system
- name: Install pre-commit hooks
run: |
pre-commit install --install-hooks
pre-commit install --hook-type pre-push
- name: Run linter
run: make plugin=${{ inputs.plugin }} lint
- name: Run mypy
run: make plugin=${{ inputs.plugin }} mypy