Révision 5fea281f
modulesync 4.2.0
.github/CONTRIBUTING.md | ||
---|---|---|
25 | 25 |
|
26 | 26 |
* Fork the repo. |
27 | 27 |
* Create a separate branch for your change. |
28 |
* We only take pull requests with passing tests, and documentation. [travis-ci](http://travis-ci.org) runs the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
|
|
28 |
* We only take pull requests with passing tests, and documentation. [GitHub Actions](https://docs.github.com/en/actions) run the tests for us. You can also execute them locally. This is explained [in a later section](#the-test-matrix).
|
|
29 | 29 |
* Checkout [our docs](https://voxpupuli.org/docs/reviewing_pr/) we use to review a module and the [official styleguide](https://puppet.com/docs/puppet/6.0/style_guide.html). They provide some guidance for new code that might help you before you submit a pull request. |
30 | 30 |
* Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test. |
31 | 31 |
* Squash your commits down into logical components. Make sure to rebase against our current master. |
... | ... | |
232 | 232 |
with: |
233 | 233 |
|
234 | 234 |
```sh |
235 |
bundle exec rake beaker |
|
236 |
``` |
|
237 |
|
|
238 |
This will run the tests on the module's default nodeset. You can override the |
|
239 |
nodeset used, e.g., |
|
240 |
|
|
241 |
```sh |
|
242 |
BEAKER_set=centos-7-x64 bundle exec rake beaker |
|
243 |
``` |
|
244 |
|
|
245 |
There are default rake tasks for the various acceptance test modules, e.g., |
|
246 |
|
|
247 |
```sh |
|
248 |
bundle exec rake beaker:centos-7-x64 |
|
249 |
bundle exec rake beaker:ssh:centos-7-x64 |
|
250 |
``` |
|
251 |
|
|
252 |
If you don't want to have to recreate the virtual machine every time you can |
|
253 |
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at |
|
254 |
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the |
|
255 |
created virtual machines will be in `.vagrant/beaker_vagrant_files`. |
|
256 |
|
|
257 |
Beaker also supports docker containers. We also use that in our automated CI |
|
258 |
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant: |
|
259 |
|
|
260 |
```sh |
|
261 |
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker |
|
235 |
BEAKER_setfile=debian10-x64 bundle exec rake beaker |
|
262 | 236 |
``` |
263 | 237 |
|
264 | 238 |
You can replace the string `debian10` with any common operating system. |
... | ... | |
272 | 246 |
* centos7 |
273 | 247 |
* centos8 |
274 | 248 |
|
275 |
The easiest way to debug in a docker container is to open a shell: |
|
276 |
|
|
277 |
```sh |
|
278 |
docker exec -it -u root ${container_id_or_name} bash |
|
279 |
``` |
|
249 |
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests). |
|
280 | 250 |
|
281 | 251 |
The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb) |
282 | 252 |
repository. |
Formats disponibles : Unified diff