-
Notifications
You must be signed in to change notification settings - Fork 341
84 lines (68 loc) · 2.86 KB
/
lint_and_suggest_pr.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
on:
pull_request
name: lint and suggest
jobs:
style_lint:
if: github.repository == 'leanprover-community/mathlib4' && github.event.pull_request.draft == false
name: Lint style
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
find . -name . -o -prune -exec rm -rf -- {} +
- uses: actions/checkout@v4
- name: install Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}"
# if you update this step (or its dependencies), please also update them in bot_fix_style_comment.yaml
- name: lint
run: |
lake exe lint-style --fix
- name: suggester / lint-style
uses: reviewdog/action-suggester@v1
with:
tool_name: lint-style (comment with "bot fix style" to have the bot commit all style suggestions)
- name: Install bibtool
run: |
sudo apt-get update
sudo apt-get install -y bibtool
# if you update this step (or its dependencies), please also update them in bot_fix_style_comment.yaml
- name: lint references.bib
run: |
# ignoring the return code allows the following `reviewdog` step to add GitHub suggestions
./scripts/lint-bib.sh || true
- name: suggester / lint-bib
uses: reviewdog/action-suggester@v1
with:
tool_name: lint-bib (comment with "bot fix style" to have the bot commit all style suggestions)
check_imported:
if: github.repository == 'leanprover-community/mathlib4' && github.event.pull_request.draft == false
name: Check all files imported
runs-on: ubuntu-latest
steps:
- name: cleanup
run: |
find . -name . -o -prune -exec rm -rf -- {} +
- uses: actions/checkout@v4
- name: install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.1.1/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> "${GITHUB_PATH}"
# if you update this step (or its dependencies), please also update them in bot_fix_style_comment.yaml
- name: update {Mathlib, Tactic, Counterexamples, Archive}.lean
run:
# ignoring the return code allows the following `reviewdog` step to add GitHub suggestions
lake exe mk_all || true
- name: suggester / import list
uses: reviewdog/action-suggester@v1
with:
tool_name: imports (comment with "bot fix style" to have the bot commit all style suggestions)