-
Notifications
You must be signed in to change notification settings - Fork 103
41 lines (31 loc) · 988 Bytes
/
code-quality-pr.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
# This workflow finds which files were changed, prints them,
# and runs `pre-commit` on those files.
# Inspired by the sktime library:
# https://github.com/alan-turing-institute/sktime/blob/main/.github/workflows/test.yml
name: Code Quality PR
env:
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
on:
pull_request:
branches: [main, "release/*"]
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Find modified files
id: file_changes
uses: trilom/[email protected]
with:
output: " "
- name: List modified files
run: echo '${{ steps.file_changes.outputs.files}}'
- name: Run pre-commits
uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.files}}