mirror of
https://github.com/ovh/the-bastion.git
synced 2025-09-04 12:04:11 +08:00
chore: add basic tests on push
This commit is contained in:
parent
fde20136ef
commit
386b20b71c
3 changed files with 27 additions and 2 deletions
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -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
20
.github/workflows/tests_basic.yml
vendored
Normal 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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue