-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow running acceptance tests on travis #230
Conversation
Wow, thanks @3flex... |
I think we should not provide default_sets in our default config for all modules. Most of them don't have working acceptance tests. In general I'm against acceptance tests on travis. This slows down the matrix. We currently have 10 repos and only get resources on a per org basis, not per repo. And our single testmatrix already takes such a long time. We are already discussing it in #80, maybe we should continue there before we merge/decline this one? |
There are a bunch of docker nodesets in this repo now. Can this Pull Request be closed? |
@juniorsysadmin this PR was less about adding docker nodesets and more about enabling support for running acceptance tests on Travis. If this were to be merged I can easily rebase and remove the nodesets the PR originally introduced. |
Go ahead |
40ee40b
to
d93302e
Compare
Rebased, and made a couple of minor adjustments for clarity. Though there wasn't a final consensus in #80, I'm not sure there's a good reason not to merge this... as the changes in puppet-corosync proved, this PR isn't required to enable running acceptance tests on Travis, it just makes it a little simpler to do, and the functionality it enables is entirely opt-in on a per-module basis. I tested against puppet-nginx and puppet-corosync for sanity, since nginx module has some Diff from nginx module:diff --git a/.msync.yml b/.msync.yml
index d505802..1bc592b 100644
--- a/.msync.yml
+++ b/.msync.yml
@@ -1 +1 @@
-modulesync_config_version: '0.16.7'
+modulesync_config_version: '0.16.8'
diff --git a/.travis.yml b/.travis.yml
index da95439..61b4de3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,6 @@
sudo: false
language: ruby
cache: bundler
-bundler_args: --without system_tests development
before_install:
- bundle -v
- rm Gemfile.lock || true
@@ -15,23 +14,44 @@ script:
matrix:
fast_finish: true
include:
+ - rvm: 2.1.9
+ bundler_args: --without development
+ dist: trusty
+ env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04 CHECK=beaker
+ services: docker
+ sudo: required
+ - rvm: 2.1.9
+ bundler_args: --without development
+ dist: trusty
+ env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7 CHECK=beaker
+ services: docker
+ sudo: required
- rvm: 1.9.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
- rvm: 2.1.9
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.9
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.3.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.3.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
allow_failures:
- rvm: 2.4.0 Diff from corosync module:diff --git a/.msync.yml b/.msync.yml
index d505802..1bc592b 100644
--- a/.msync.yml
+++ b/.msync.yml
@@ -1 +1 @@
-modulesync_config_version: '0.16.7'
+modulesync_config_version: '0.16.8'
diff --git a/.travis.yml b/.travis.yml
index 007d519..a9b6e6b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,6 @@
sudo: false
language: ruby
cache: bundler
-bundler_args: --without system_tests development
before_install:
- bundle -v
- rm Gemfile.lock || true
@@ -16,43 +15,52 @@ matrix:
fast_finish: true
include:
- rvm: 1.9.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
- rvm: 2.1.9
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.9
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.3.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.3.3
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
+ bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.1
+ bundler_args: --without development
env: PUPPET_INSTALL_TYPE=agent CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/centos-7
services: docker
sudo: required
- bundler_args: --without development
- rvm: 2.3.1
+ bundler_args: --without development
env: PUPPET_INSTALL_TYPE=agent CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/debian-8
services: docker
sudo: required
- bundler_args: --without development
- rvm: 2.3.1
+ bundler_args: --without development
env: PUPPET_INSTALL_TYPE=agent CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
services: docker
sudo: required
- bundler_args: --without development
- rvm: 2.3.1
+ bundler_args: --without development
env: PUPPET_INSTALL_TYPE=agent CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/ubuntu-16.04
services: docker
sudo: required
- bundler_args: --without development
allow_failures:
- rvm: 2.4.0
branches: |
I recently added acceptance to puppet-jira for docker on travis; I'm on the positive side of this. |
This is going to need a rebase however, as we just dropped puppet3 support in the configs. It's pretty lengthy so I don't trust myself to resolve the conflicts on my own esp since I can't test it. |
Just rebased using Github's web UI, so please do a squash and merge if this is to be merged as it added another commit. |
Is there any other action required for this to be merged? Happy to make any changes, just don't want the PR to get stale again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running acceptance tests automatically is IMHO great!
Opt-in is also cool because for example puppet-selinux won't work in docker.
13661bf
to
a61ef39
Compare
test PR on puppet-nginx showed that beaker tests were run. test on puppet-selinux showed that beaker tests were not added to travis.yml (because not configured to do). |
Closes #80
Full credit to Puppet from where this was lifted (puppetlabs/modulesync_configs#58), with a couple of minor changes to ensure it fits better with the Voxpupuli Gemfile.
Tested with puppet-nginx module.
The biggest change compared with Puppet's version is that acceptance tests are NOT run by default. Each module would have to enable docker sets in their Travis file (see https://github.com/voxpupuli/puppet-nginx/pull/885/files#diff-f620401c6bdf661e1275316a6e01b62f for an example).
It's probably a good idea to enable by default in future but I thought it might be too disruptive right now.