-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add automated tests #4
Open
Chithrak07
wants to merge
16
commits into
master
Choose a base branch
from
add-automated-tests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ad825ca
Add automated tests
Chithrak07 fc23172
Fix molecule tests
Chithrak07 519d2f8
Add status badge
Chithrak07 61a493b
Use prepare.yml
Chithrak07 1d1c05e
Fix typo
Chithrak07 911b60f
Fix typo
Chithrak07 feb0784
Install python
Chithrak07 b2b10ce
Install python
Chithrak07 a29ea94
Add acromedia-nginx role as dependency
Chithrak07 c192d64
Add acromedia-nginx role as dependency
Chithrak07 a08b573
Do some housekeeping / reorganizing
dale-c-anderson 4c884e0
Let us just install certbot, and not actually try and register a cert…
dale-c-anderson 5438014
Write a passing test so we can close this PR, and open a new one that…
dale-c-anderson a3906cc
Stop after the first failure
dale-c-anderson f53097e
Conver shell tasks to something that passes idempotence
dale-c-anderson 84fcbd6
Make sure cron job can be installed during molecule test on RedHat
dale-c-anderson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,46 @@ | ||
--- | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the main branch | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "${{ github.repository }}" | ||
- name: molecule | ||
uses: robertdebock/[email protected] | ||
with: | ||
command: lint | ||
test: | ||
needs: | ||
- lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: | ||
- geerlingguy/docker-ubuntu2004-ansible:latest | ||
- geerlingguy/docker-ubuntu1804-ansible:latest | ||
- geerlingguy/docker-ubuntu1604-ansible:latest | ||
- geerlingguy/docker-centos8-ansible:latest | ||
- geerlingguy/docker-centos7-ansible:latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: "${{ github.repository }}" | ||
- name: molecule | ||
uses: robertdebock/[email protected] | ||
with: | ||
image: "${{ matrix.image }}" | ||
options: parallel | ||
env: | ||
MOLECULE_DOCKER_IMAGE: "${{ matrix.image }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
******* | ||
Docker driver installation guide | ||
******* | ||
|
||
Requirements | ||
============ | ||
|
||
* Docker Engine | ||
|
||
Install | ||
======= | ||
|
||
Please refer to the `Virtual environment`_ documentation for installation best | ||
practices. If not using a virtual environment, please consider passing the | ||
widely recommended `'--user' flag`_ when invoking ``pip``. | ||
|
||
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ | ||
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site | ||
|
||
.. code-block:: bash | ||
|
||
$ pip install 'molecule[docker]' |
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,17 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: true | ||
|
||
vars: | ||
- default_mail_recipient: [email protected] | ||
pre_tasks: | ||
|
||
- name: Install nginx | ||
apt: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'll need to either use "package" instead of "apt" (will only works if the package is the same name on both OS'es), or split this into OS-specific versions. |
||
name: nginx | ||
update_cache: yes | ||
state: present | ||
|
||
roles: | ||
- role: ansible-role-letsencrypt |
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,17 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: ${MOLECULE_DOCKER_IMAGE:-'geerlingguy/docker-ubuntu1804-ansible:latest'} | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.yml} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please use fictional values instead.