From 8ae46e5d490801b492daa17dbdeda55bb4325fce Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 15 Oct 2019 05:43:38 +0100 Subject: [PATCH] ci(travis): obtain `saltcheck.py` and run the tests (only on `develop`) * Based on the latest development version from the `neon` branch - Also includes sending the appropriate exit codes (e.g. for failures) --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.travis.yml b/.travis.yml index 55c36b0..3f21c40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,24 @@ cache: bundler ## Script to run for the test stage script: + # yamllint disable rule:line-length + # Converge and verify the instance; `saltcheck` relies upon the `converge` as well - bin/kitchen verify "${INSTANCE}" + # If a `develop` instance, get the appropriate version of `saltcheck.py` (temporary) + - if [ ! -z $(echo "${INSTANCE}" | grep \\-develop-) ]; then + bin/kitchen exec "${INSTANCE}" -c + "sudo curl -o \$(find /usr/lib/ -type d -name modules | grep packages/salt/modules)/saltcheck.py + https://raw.githubusercontent.com/myii/salt/fix/add-retcode/salt/modules/saltcheck.py"; + fi + # If a `develop` instance, run all of the `saltcheck` tests + - if [ ! -z $(echo "${INSTANCE}" | grep \\-develop-) ]; then + bin/kitchen exec "${INSTANCE}" -c + "sudo salt-call + --config-dir=/tmp/kitchen/etc/salt + saltcheck.run_state_tests + cron check_all=True"; + fi + # yamllint enable rule:line-length ## Stages and jobs matrix stages: