Skip to content

Commit fae9453

Browse files
committed
Consolidate Perl dependency installation and formatting check in latexindent-check job
1 parent 624f8c8 commit fae9453

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,15 @@ jobs:
6464
- uses: xu-cheng/texlive-action@v2
6565
with:
6666
scheme: full
67-
68-
- name: Install Perl dependencies
69-
run: |
70-
sudo apt-get update
71-
sudo apt-get install -y perl libyaml-tiny-perl libfile-homedir-perl libfile-find-rule-perl
72-
sudo cpan -i Unicode::GCString
73-
74-
- name: Check formatting of all .tex files
75-
run: |
76-
find . -name "*.tex" | while read file; do
77-
perl $(kpsewhich latexindent.pl) "$file" > "$file.formatted"
78-
if ! diff -q "$file" "$file.formatted" > /dev/null; then
79-
echo "::error file=$file::File is not properly formatted. Run 'make format' locally."
80-
exit 1
81-
fi
82-
rm "$file.formatted"
83-
done
67+
run: |
68+
sudo apt-get update
69+
sudo apt-get install -y perl libyaml-tiny-perl libfile-homedir-perl libfile-find-rule-perl
70+
sudo cpan -i Unicode::GCString
71+
find . -name "*.tex" | while read file; do
72+
perl $(kpsewhich latexindent.pl) "$file" > "$file.formatted"
73+
if ! diff -q "$file" "$file.formatted" > /dev/null; then
74+
echo "::error file=$file::File is not properly formatted. Run 'make format' locally."
75+
exit 1
76+
fi
77+
rm "$file.formatted"
78+
done

0 commit comments

Comments
 (0)