mirror of
https://github.com/ovh/the-bastion.git
synced 2024-12-27 01:56:24 +08:00
33 lines
1 KiB
YAML
33 lines
1 KiB
YAML
name: Basic tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
name: perlcritic, perltidy, shellcheck, doc
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- name: install prerequisites
|
|
run: sudo ./bin/admin/packages-check.sh -i -d
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
- name: shellcheck
|
|
run: bin/dev/shell-check.sh
|
|
- name: perl critic
|
|
run: bin/dev/perl-critic.sh
|
|
- name: perl tidy
|
|
run: bin/dev/perl-tidy.sh test
|
|
- 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
|