2017-12-13 02:33:49 -06:00
|
|
|
# workaround for missing IPv6 address support
|
|
|
|
# https://github.com/travis-ci/travis-ci/issues/8891
|
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
|
|
|
group: deprecated-2017Q4
|
|
|
|
|
2016-12-20 08:47:31 -06:00
|
|
|
language: python
|
2017-12-13 02:33:49 -06:00
|
|
|
|
2016-09-05 03:19:40 -05:00
|
|
|
services:
|
|
|
|
- docker
|
2016-12-21 03:16:47 -06:00
|
|
|
python:
|
2017-11-20 02:14:42 -06:00
|
|
|
- "3.6"
|
2016-12-21 03:30:49 -06:00
|
|
|
cache: pip
|
2016-11-30 03:37:46 -06:00
|
|
|
env:
|
|
|
|
global:
|
2017-08-28 04:55:28 -05:00
|
|
|
- TEST_RUNNER_IMAGE="freeipa/freeipa-test-runner:master-latest"
|
2017-10-25 01:28:39 -05:00
|
|
|
PEP8_ERROR_LOG="pycodestyle_errors.log"
|
2016-12-20 09:04:02 -06:00
|
|
|
CI_RESULTS_LOG="ci_results_${TRAVIS_BRANCH}.log"
|
2017-01-05 03:10:06 -06:00
|
|
|
CI_BACKLOG_SIZE=5000
|
2017-02-08 03:38:57 -06:00
|
|
|
CI_RUNNER_LOGS_DIR="/tmp/test-runner-logs"
|
|
|
|
CI_RUNNER_LOG_ARCHIVE="freeipa-ci-pr-${TRAVIS_PULL_REQUEST}-job-${TRAVIS_JOB_NUMBER}.tar.gz"
|
2016-11-30 03:37:46 -06:00
|
|
|
matrix:
|
2016-12-20 09:04:02 -06:00
|
|
|
- TASK_TO_RUN="lint"
|
2017-02-07 11:29:08 -06:00
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2017-11-22 03:15:08 -06:00
|
|
|
- TASK_TO_RUN="webui-unit"
|
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2017-02-07 11:29:08 -06:00
|
|
|
- TASK_TO_RUN="run-tests"
|
|
|
|
PYTHON=/usr/bin/python3
|
2018-08-23 07:54:28 -05:00
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2017-09-08 02:45:06 -05:00
|
|
|
TESTS_TO_RUN="test_xmlrpc/test_[a-k]*.py"
|
2017-02-07 11:29:08 -06:00
|
|
|
- TASK_TO_RUN="run-tests"
|
|
|
|
PYTHON=/usr/bin/python3
|
2018-08-23 07:54:28 -05:00
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2017-02-07 11:29:08 -06:00
|
|
|
TESTS_TO_RUN="test_cmdline
|
2017-09-08 02:45:06 -05:00
|
|
|
test_install
|
|
|
|
test_ipaclient
|
2017-02-07 11:29:08 -06:00
|
|
|
test_ipalib
|
2017-10-11 05:09:30 -05:00
|
|
|
test_ipaplatform
|
2017-06-19 12:11:10 -05:00
|
|
|
test_ipapython
|
2017-06-20 03:41:28 -05:00
|
|
|
test_ipaserver
|
2019-07-08 03:35:23 -05:00
|
|
|
test_ipatests_plugins
|
2017-11-14 09:42:38 -06:00
|
|
|
test_xmlrpc/test_[l-z]*.py"
|
2017-11-16 05:27:16 -06:00
|
|
|
- TASK_TO_RUN="tox"
|
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2017-12-13 02:33:49 -06:00
|
|
|
|
|
|
|
before_install:
|
|
|
|
- ip addr show
|
|
|
|
- ls /proc/net
|
|
|
|
- cat /proc/net/if_inet6
|
|
|
|
# - ip addr show dev lo | grep -q inet6 || (echo "No IPv6 address found"; exit 1)
|
|
|
|
|
2016-12-21 03:30:49 -06:00
|
|
|
install:
|
2017-05-09 11:36:51 -05:00
|
|
|
- pip3 install --upgrade pip
|
2017-11-20 02:14:42 -06:00
|
|
|
- pip3 install pycodestyle
|
2016-11-30 03:37:46 -06:00
|
|
|
- >
|
|
|
|
pip3 install
|
2017-11-22 03:15:08 -06:00
|
|
|
git+https://github.com/freeipa/ipa-docker-test-runner@release-0-3-1
|
2016-09-05 03:19:40 -05:00
|
|
|
|
|
|
|
script:
|
2017-02-08 03:38:57 -06:00
|
|
|
- mkdir -p $CI_RUNNER_LOGS_DIR
|
2016-12-20 09:03:25 -06:00
|
|
|
- travis_wait 50 ./.travis_run_task.sh
|
2017-10-03 05:41:45 -05:00
|
|
|
- test -z "`cat $PEP8_ERROR_LOG`"
|
2016-11-30 03:37:46 -06:00
|
|
|
after_failure:
|
2017-01-05 03:10:06 -06:00
|
|
|
- echo "Test runner output:"; tail -n $CI_BACKLOG_SIZE $CI_RESULTS_LOG
|
2016-12-20 09:04:02 -06:00
|
|
|
- echo "PEP-8 errors:"; cat $PEP8_ERROR_LOG
|
2017-02-08 03:38:57 -06:00
|
|
|
- >
|
|
|
|
echo "Archiving CI logs";
|
|
|
|
if [[ "$TASK_TO_RUN" != "lint" ]]; then
|
|
|
|
tar --ignore-failed-read -uvf var_log.tar $CI_RESULTS_LOG $PEP8_ERROR_LOG;
|
|
|
|
gzip var_log.tar;
|
|
|
|
mv var_log.tar.gz $CI_RUNNER_LOG_ARCHIVE;
|
|
|
|
|
|
|
|
transfer_url=$(
|
|
|
|
curl --upload-file \
|
|
|
|
./$CI_RUNNER_LOG_ARCHIVE \
|
|
|
|
https://transfer.sh/${CI_RUNNER_LOG_ARCHIVE}) &&
|
|
|
|
echo "Download log archive from ${transfer_url}" ||
|
|
|
|
echo "Failed to upload log archive!";
|
|
|
|
fi
|