-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.32 KB
/
pre-commit.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
# [install the GitHub Application on the relevant repositories](https://github.com/apps/pre-commit-ci-lite/installations/new)
name: Run pre-commit.ci lite
on:
pull_request:
push:
branches: [main]
jobs:
main:
# note: the step must have either the default name or contain the text
# pre-commit-ci-lite. the application uses this to find the right workflow.
# [pre-commit.ci lite](https://pre-commit.ci/lite.html)
name: pre-commit-ci-lite
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
token: ${{ secrets.SGILE_PAT }}
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies and package
run: |
pip install -r requirements.dev.txt
pip install pydantic
- name: File changes
uses: trilom/[email protected]
id: file_changes
with:
prNumber: ${{ github.event.number }}
output: " "
- name: pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.files }}
- name: Pre commit lite
uses: pre-commit-ci/[email protected]
if: always()