Skip to content
Permalink
Browse files

Merge pull request #479 from enthought/ci/travis-cron-job

Test packages from source using cron jobs
  • Loading branch information...
rahulporuri committed Jun 18, 2019
2 parents e015258 + 49527d2 commit af87dd4e06237e0b1d70dd7bca1ab803af4ad6b6
Showing with 20 additions and 1 deletion.
  1. +1 −0 .travis.yml
  2. +19 −1 etstool.py
@@ -31,6 +31,7 @@ before_install:
- edm install -y wheel click coverage
install:
- edm run -- python etstool.py install --runtime=${RUNTIME} || exit
- if [[ ${TRAVIS_EVENT_TYPE} == 'cron' ]]; then edm run -- python etstool.py install --runtime=${RUNTIME} --source || exit; fi
script:
- edm run -- python etstool.py test --runtime=${RUNTIME} || exit
- edm run -- python etstool.py docs --runtime=${RUNTIME} || exit
@@ -95,13 +95,20 @@
"traitsui",
}

# Dependencies we install from source for testing
source_dependencies = {
"traitsui"
}

# Python 2-specific dependencies.
python2_dependencies = {
"mock",
}

supported_runtimes = ["2.7.13", "3.5.2", "3.6.0"]

github_url_fmt = "git+http://github.com/enthought/{0}.git#egg={0}"

@click.group()
def cli():
pass
@@ -111,7 +118,8 @@ def cli():
@click.option('--runtime', default='3.6')
@click.option('--environment', default=None)
@click.option('--docs/--no-docs', default=True)
def install(runtime, environment, docs):
@click.option('--source/--no-source', default=False)
def install(runtime, environment, docs, source):
""" Install project and dependencies into a clean EDM environment and
optionally install further dependencies required for building
documentation.
@@ -130,6 +138,16 @@ def install(runtime, environment, docs):
]
click.echo("Creating environment '{environment}'".format(**parameters))
execute(commands, parameters)
if source:
commands = ["edm plumbing remove-package --environment {environment} --force " + ' '.join(source_dependencies)]
execute(commands, parameters)
source_pkgs = [github_url_fmt.format(pkg) for pkg in source_dependencies]
commands = [
"python -m pip install {pkg} --no-deps".format(pkg=pkg)
for pkg in source_pkgs
]
commands = ["edm run -e {environment} -- " + command for command in commands]
execute(commands, parameters)
if docs:
commands = [
"edm run -e {environment} -- pip install -r "

0 comments on commit af87dd4

Please sign in to comment.
You can’t perform that action at this time.