2020-10-21 00:33:27 +08:00
|
|
|
name: Basic tests
|
|
|
|
|
2020-11-01 20:08:14 +08:00
|
|
|
on: [push, pull_request]
|
2020-10-21 00:33:27 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2020-12-16 00:58:09 +08:00
|
|
|
name: perlcritic, perltidy, shellcheck, doc
|
2020-11-23 05:05:45 +08:00
|
|
|
runs-on: ubuntu-20.04
|
2020-10-21 00:33:27 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install prerequisites
|
2020-12-16 00:58:09 +08:00
|
|
|
run: sudo ./bin/admin/packages-check.sh -i -d
|
2020-10-21 00:33:27 +08:00
|
|
|
env:
|
|
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
- name: shellcheck
|
|
|
|
run: bin/dev/shell-check.sh
|
|
|
|
- name: perl critic
|
|
|
|
run: bin/dev/perl-critic.sh
|
|
|
|
- name: perl tidy
|
2020-11-23 05:05:45 +08:00
|
|
|
run: bin/dev/perl-tidy.sh test
|
2020-12-16 00:58:09 +08:00
|
|
|
- name: autogenerate documentation
|
|
|
|
run: make -C doc/sphinx autogenerated
|
|
|
|
- name: verify git diff
|
|
|
|
run: |
|
|
|
|
if [ "$(git diff --numstat | wc -l)" != 0 ]; then
|
|
|
|
git diff
|
|
|
|
echo
|
|
|
|
echo "Some autogenerated documentation files are not up to date." >&2
|
|
|
|
echo "Please run 'make -C doc/sphinx autogenerated' and commit the result." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|