-
-
Notifications
You must be signed in to change notification settings - Fork 112
37 lines (37 loc) · 971 Bytes
/
check-style.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
name: Check style
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
check_style:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: |
echo -e '### Status\n```text' >> $GITHUB_STEP_SUMMARY
git status | tee -a $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Full diff
if: always()
run: |
echo -e '### Diff\n```diff' >> $GITHUB_STEP_SUMMARY
git diff | tee -a $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY