Skip to content

Commit

Permalink
Travis: Implement yaml checking for Snappy
Browse files Browse the repository at this point in the history
This patch enables Travis CI to check the snapcraft.yaml files for any
potential problems.  Yamllint installation is implemented in the script
which, might be sane to be moved to .travis.yml instead.

Signed-off-by: 林博仁(Buo-ren Lin) <Buo.Ren.Lin@gmail.com>
  • Loading branch information
brlin-tw committed May 10, 2018
1 parent a271e7c commit 8fd6906
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ before_install:

script:
- scripts/travis-check-translations.sh
- scripts/travis-check-snappy-yamllint.sh
# don't build directly, create a tarball first and try building from that
- ./bootstrap && ./configure && make dist && make distcheck

Expand Down
11 changes: 11 additions & 0 deletions scripts/travis-check-snappy-yamllint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env sh
# This script checks the snapcraft configuration YAML files
# according to the rules at /snappy/.yamllint
set -o errexit -o nounset

pip install --user yamllint
yamllint --version

for snapcraft_config in snappy/poedit*/snap/snapcraft.yaml ; do
yamllint --config-file snappy/.yamllint "${snapcraft_config}"
done

0 comments on commit 8fd6906

Please sign in to comment.