This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And move testing out of the home page to it. fixes: #6862
- Loading branch information
1 parent
faa4791
commit ebc5127
Showing
4 changed files
with
112 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added a contributing guide, and moved testing out of the home page to it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
Contributing | ||
============ | ||
|
||
Pull Request Checklist | ||
------------------------ | ||
1. Make sure your change does not break idempotency tests. See [Testing](#Testing) | ||
(or let CI run the tests for you if you are certain it is idempotent.) | ||
If a task cannot be made idempotent, add the tag [molecule-idempotence-notest](https://github.com/ansible-community/molecule/issues/816#issuecomment-573319053). | ||
2. Unless a change is small or doesn't affect users, create an issue on | ||
https://pulp.plan.io/projects/pulp . Set the Category to "Installer". | ||
3. Add [a changelog update.](https://docs.pulpproject.org/contributing/git.html#changelog-update) | ||
4. Write an excellent [Commit Message.](https://docs.pulpproject.org/contributing/git.html#commit-message) | ||
Make sure you reference and link to the issue. | ||
5. Push your branch to your fork and open a [Pull request across forks.](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) | ||
6. Add GitHub labels as appropriate. | ||
|
||
Testing | ||
------- | ||
|
||
The tests can be run as they are on travis with **tox**, or they can run with various options using | ||
**molecule** directly. | ||
|
||
**Requirements:** | ||
Install Docker, and add yourself to the group that is authorized to | ||
administer containers, and log out and back in to make the permissions change | ||
take effect. The authorized group is typically the "docker" group: | ||
|
||
```bash | ||
gpasswd --add "$(whoami)" docker | ||
``` | ||
|
||
**NOTE:** Docker containers can differ from bare-metal or VM OS installs. | ||
They can have different packages installed, they can run different kernels, | ||
and so on. | ||
|
||
**Using Tox:** | ||
|
||
1. Install [tox](https://tox.readthedocs.io/en/latest/). This can be done | ||
through the system package manager or into a virtualenv: | ||
|
||
```bash | ||
python3 -m venv ~/.venvs/pulp_installer | ||
pip install --upgrade pip | ||
pip install tox | ||
``` | ||
2. Install at least one of the Python interpreters listed in tox.ini. These are | ||
currently Python 2.7 and 3.6. | ||
**WARNING:** Anyone added to the docker group is root equivalent. More | ||
information [here](https://github.com/docker/docker/issues/9976) and | ||
[here](https://docs.docker.com/engine/security/security/). | ||
|
||
4. Run `tox`. If you only have a subset of the supported Python interpreters | ||
available, specify which environments to exercise: | ||
|
||
```bash | ||
tox -e py36 | ||
``` | ||
|
||
**Using Molecule:** | ||
|
||
1. Install [molecule](https://molecule.readthedocs.io/en/latest/), | ||
[molecule-inspec](https://github.com/ansible-community/molecule-inspec), | ||
and [ansible-lint](https://docs.ansible.com/ansible-lint/). | ||
|
||
|
||
It is recommended that you do so with `pip` in a virtualenv. | ||
2. Run molecule commands. | ||
|
||
Test all scenarios on all hosts. | ||
```bash | ||
molecule test --all | ||
``` | ||
|
||
Test a specific scenario. | ||
```bash | ||
molecule test --scenario-name source | ||
``` | ||
|
||
Use debug for increased verbosity. | ||
```bash | ||
molecule --debug test --all | ||
``` | ||
|
||
Create and provision, but don't run tests or destroy. | ||
```bash | ||
molecule converge --all | ||
``` | ||
|
||
Docs Testing | ||
------------ | ||
|
||
On Fedora: | ||
``` | ||
sudo dnf install mkdocs python3-pymdown-extensions | ||
``` | ||
|
||
Cross-platform: | ||
``` | ||
pip install mkdocs pymdown-extensions | ||
``` | ||
|
||
Then: | ||
``` | ||
`mkdocs serve` | ||
``` | ||
Click the link it outputs. As you save changes to files modified in your editor, | ||
the browser will automatically show the new content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters