-
Notifications
You must be signed in to change notification settings - Fork 13
90 lines (75 loc) · 2.66 KB
/
prlinter.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: LaTex Cheks 🕵
on:
pull_request:
branches: [master, main]
types:
- opened
- reopened
- synchronize
jobs:
changed-files:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Looking for changed files 👁
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: "**.tex"
- run: echo "${{ steps.changed-files.outputs.all_changed_files }}"
linter:
needs: changed-files
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Linter Checker 🖊
if: needs.changed-files.outputs.any_changed == 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install Chktex
run: sudo apt-get install chktex -y
- name: Run Chktex
id: chktex
run: chktex ${{ needs.changed-files.outputs.all_changed_files }}
styler:
needs: changed-files
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Styler Checker ✨
if: needs.changed-files.outputs.any_changed == 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setupu Java ☕️
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Install textidote
run: wget https://github.com/sylvainhalle/textidote/releases/latest/download/textidote.jar
- name: Run textidote
run: java -jar textidote.jar ${{ needs.changed-files.outputs.all_changed_files }}
typo:
needs: changed-files
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Typo Checker 🔍
if: needs.changed-files.outputs.any_changed == 'true'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Java ☕️
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Install ltex-cli
run: wget https://github.com/valentjn/ltex-ls/releases/latest/download/ltex-ls-16.0.0.tar.gz && tar xvf ltex-ls-16.0.0.tar.gz
- name: Run ltex-cli
run: ./ltex-ls-16.0.0/bin/ltex-cli --client-configuration=.github/workflows/configs/ltex.json ${{ needs.changed-files.outputs.all_changed_files }}