mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +00:00
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:
parent
b17d309860
commit
3a2466df31
1 changed files with 19 additions and 5 deletions
24
.travis.yml
24
.travis.yml
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue