ci(travis): add style stage and move dependency

Add a stage that do a style check and move shellcheck dependency to the stage where is used
This commit is contained in:
Giulio Coa 2022-08-05 08:43:45 +02:00
parent b17d309860
commit 3a2466df31

View file

@ -3,15 +3,13 @@ language: shell
addons:
hosts:
- pivpn.test
apt:
packages:
- shellcheck
services:
- docker
stages:
- lint
- style
- test
branches:
@ -24,11 +22,27 @@ jobs:
- stage: lint
name: "Shellcheck lint"
dist: focal
addons:
apt:
packages:
- shellcheck
virt: vm
arch: amd64
script:
- shellcheck auto_install/install.sh
- find scripts/ -type f | xargs shellcheck
- shellcheck -x auto_install/install.sh
- find scripts/ -type f | xargs shellcheck -x
- stage: style
name: "Shell Style Guide"
dist: xenial
addons:
snaps:
- shfmt
virt: vm
arch: amd64
script:
- shfmt -d -i 2 -ci -sr auto_install/install.sh
- find scripts/ -type f | xargs shfmt -d -i 2 -ci -sr
- stage: test
name: "OpenVPN Xenial & Commands"