chore: add basic tests on push

This commit is contained in:
Stéphane Lesimple 2020-10-20 16:33:27 +00:00
parent fde20136ef
commit 386b20b71c
No known key found for this signature in database
GPG key ID: 4B4A3289E9D35658
3 changed files with 27 additions and 2 deletions

View file

@ -6,6 +6,7 @@ on:
jobs:
tests_full:
name: functional tests on all supported distros
strategy:
matrix:
platform: [centos7, centos8, debian10, debian8, debian9, opensuse15, opensuse151, ubuntu1404, ubuntu1604, ubuntu1804, ubuntu2004]
@ -19,6 +20,7 @@ jobs:
DOCKER_TTY: false
tests_short:
name: functional tests on Debian 10
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'tests:short')
steps:

20
.github/workflows/tests_basic.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Basic tests
on: push
jobs:
test:
name: perlcritic, perltidy & shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install prerequisites
run: sudo apt update && sudo apt install -y shellcheck libperl-critic-perl perltidy
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

View file

@ -43,7 +43,8 @@ else
exit 1
fi
# shellcheck disable=SC2034 # those vars are also used in all our modules
# those vars are also used in all our modules
# shellcheck disable=SC2034
{
account1="testu_Ser1-"
account2="tesT-user2_"
@ -386,7 +387,9 @@ runtests()
continue
fi
echo "### RUNNING MODULE $module"
# shellcheck disable=SC1090 # as this is a loop, we do the check in a reversed way, see any included module
# as this is a loop, we do the check in a reversed way, see any included module for more info:
# shellcheck disable=SC1090
source "$module" || true
done