Skip to content

Add cron job to install/test against packages from source#914

Merged
rahulporuri merged 6 commits into
masterfrom
dev/cron
Jun 30, 2020
Merged

Add cron job to install/test against packages from source#914
rahulporuri merged 6 commits into
masterfrom
dev/cron

Conversation

@rahulporuri
Copy link
Copy Markdown
Contributor

At the moment, traits is the only package installed from source as pyface is always installed from source on CI. The changes are almost the same as that in traits PR enthought/traits#479

Sai Rahul Poruri added 2 commits June 22, 2020 12:58
- update travis config to listen to TRAVIS_EVENT_TYPE environment
  variable and do something when the envvar is cron
- add ability to install relevant packages from git source in etstool
  module

	modified:   .travis.yml
	modified:   etstool.py
I will undo this change once the CI is green - this tests the changes to
the etstool module install function

	modified:   .travis.yml
@rahulporuri
Copy link
Copy Markdown
Contributor Author

Note that there's already a weekly cron job for traitsui - it just behaves differently now.

where the keys are package names and the values are git/github source
urls for the packages

	modified:   etstool.py
Copy link
Copy Markdown
Contributor

@kitchoi kitchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One unused variable?

Comment thread etstool.py Outdated
@rahulporuri rahulporuri merged commit 9475a91 into master Jun 30, 2020
@rahulporuri rahulporuri deleted the dev/cron branch June 30, 2020 11:26
@rahulporuri
Copy link
Copy Markdown
Contributor Author

thanks for the review @kitchoi

Comment thread .travis.yml
Comment on lines 44 to +45
- for toolkit in ${TOOLKITS}; do edm run -- python etstool.py install --runtime=${RUNTIME} --toolkit=${toolkit} || exit; done
- if [[ ${TRAVIS_EVENT_TYPE} == 'cron' ]]; then for toolkit in ${TOOLKITS}; do edm run -- python etstool.py install --runtime=${RUNTIME} --toolkit=${toolkit} --source || exit; done; fi
Copy link
Copy Markdown
Contributor

@kitchoi kitchoi Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only realized later that this causes install to be called twice on the cronjob.
Options:
(1) in etstool.py, set the default of --source based on some environment variable, e.g. default=os.environ.get("IS_CRON", False)
(2) compose the option flags in the travis.yml based on the environment variable..., e.g. if [[${TRAVIS_EVENT_TYPE} == 'cron' ]] FLAGS="--source" something like that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. sorry. i wasn't trying to optimize CI time. I'll look into this this week (before i start adding more cron jobs which are wasteful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants