This repository has been archived by the owner on Dec 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Execute Selenium Tests after GithubPage Deployment (#4)
- Loading branch information
Showing
13 changed files
with
299 additions
and
17 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
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,25 @@ | ||
#!/bin/sh | ||
echo "==> Install common stuff missing from the slim base image..." && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gnupg \ | ||
dirmngr \ | ||
wget \ | ||
ca-certificates && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
echo "==> Add Google repo for Chrome..." | ||
wget -q -O- https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | ||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google.list | ||
|
||
echo "==> Install prerequisite stuff..." && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3-dev \ | ||
python3-pip \ | ||
xvfb \ | ||
libfontconfig \ | ||
libfreetype6 \ | ||
xfonts-scalable \ | ||
fonts-liberation \ | ||
google-chrome-stable |
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,8 @@ | ||
Development | ||
---------------------------------------------------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
projectstructure | ||
process |
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,122 @@ | ||
.. _development-process: | ||
|
||
Development Process | ||
======================================================== | ||
|
||
.. _development-process-branch-model: | ||
|
||
Branch Modell | ||
------------------------------------------ | ||
|
||
As Branchmodel we use a mix of `Gitflow <https://datasift.github.io/gitflow/IntroducingGitFlow.html>`_ and `pull-requests <https://help.github.com/articles/about-pull-requests/>`_. | ||
Gitflow is used for the Release Process, the ``master`` branch present the latest Published Release. | ||
PullRequests are used for integrate external changes and ``feature`` branches into the :ref:`development-process-branch-model-develop`. | ||
|
||
|
||
Feature Branch | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
New features will be develop in feature branches like ``feature/integrate-cuberite``. | ||
|
||
.. warning:: | ||
|
||
Please dont use use ``feature/*`` branches in your production Environment. | ||
|
||
|
||
.. _development-process-branch-model-develop: | ||
|
||
Develop Branch | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The ``develop`` branch contains the latest unrelesed version from the template, mostly stable ;) | ||
|
||
.. _development-process-branch-model-release: | ||
|
||
Release Branch | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Master Branch | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The ``master`` present the latest published release. | ||
|
||
|
||
.. _development-process-build: | ||
|
||
Build | ||
-------------------------------------------------------- | ||
|
||
|
||
|
||
.. _development-process-test: | ||
|
||
Testing | ||
---------------------------------------------------- | ||
|
||
Static tests | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. _development-process-test-unit: | ||
|
||
Unit tests | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. _development-process-test-integrationtest: | ||
|
||
Integrations tests | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
|
||
|
||
.. _development-process-release: | ||
|
||
Releasing | ||
---------------------------------------------------- | ||
|
||
You can start the Release process with some commit like: | ||
|
||
.. code:: bash | ||
git commit --allow-empty -m "[GradeUP] grade up the branch" | ||
git push origin develop | ||
| With pushing this commit the Release Pipeline will started automatically. | ||
| **The Process** | ||
* Update the version to new Release, see :ref:`development-process-release-versioning` | ||
* create the :ref:`development-process-branch-model-release` | ||
* prepare the :ref:`development-process-branch-model-develop` branch for next version. | ||
* Create :ref:`development-process-publish-gh-release` | ||
* Publish :ref:`development-process-publish-gh-page` | ||
* execute :ref:`development-process-test-integrationtest` | ||
* delete the :ref:`development-process-branch-model-release` | ||
|
||
|
||
.. _development-process-release-versioning: | ||
|
||
Versioning | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
| This project follows `semantic versioning`_. | ||
| In the context of semantic versioning, consider the role contract to be defined by the role variables. | ||
- Changes that require user intervention will increase the **major** version. This includes changing the default value of a role variable. | ||
- Changes that do not require user intervention, but add backwards-compatible features, will increase the **minor** version. | ||
- Bug fixes will increase the **patch** version. | ||
|
||
.. _development-process-publish: | ||
|
||
Publishing | ||
---------------------------------------------------- | ||
|
||
.. _development-process-publish-gh-release: | ||
|
||
Github Release | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. _development-process-publish-gh-page: | ||
|
||
Github Page | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
.. include:: ../links.rst |
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,52 @@ | ||
Project Structure | ||
======================================================== | ||
|
||
Base Directory Structure | ||
------------------------------------------------------ | ||
|
||
`.bumpversion.cfg` | ||
Config file for `bumpversion`_ handled the `semantic versioning`_ process. More information at the :ref:`development-process` description. | ||
|
||
`.circleci/config.yml` | ||
| Used `CircleCI`_ for handle the :ref:`development-process-build`, :ref:`development-process-test`, :ref:`development-process-release` and :ref:`development-process-publish` steps. | ||
| **Status:** |CircleCI build status| | ||
`ci-scripts` | ||
Folder for ci utility scripts like, install selenium. | ||
|
||
`docs` | ||
| This project is documentated with `sphinx-doc`_. The generated deployment will be published to `ReadTheDocs` and `nolte.github.io`. | ||
| **Status:** |Documentation Status| | ||
`.github` | ||
This folder is used form the `GitHub Issue Templates <https://blog.github.com/2016-02-17-issue-and-pull-request-templates/>`_. | ||
|
||
`it-tests` | ||
This Folder contains `Selenium`_ based `pytest`_ integrations tests. Runned after a `nolte.github.io/cookiecutter-circleci <https://nolte.github.io/cookiecutter-circleci/>`_ deployment. | ||
|
||
`tests` | ||
Test for checking the CookieCutter Template generated projects, based on `pytest`_ and `pytest-cookies <https://github.com/hackebrot/pytest-cookies>`_. | ||
|
||
`tox.ini` | ||
Using `tox`_ for handle the different build and test configs. | ||
|
||
.. list-table:: Important Tox Environments | ||
:header-rows: 1 | ||
|
||
* - Tox Environment | ||
- Description | ||
* - {py27,py36}-test | ||
- Start the local builds, used `pytest-cookies`_ for testing the `cookiecutter`_ template, see :ref:`development-process-test-unit`. | ||
* - docs | ||
- Generate the html `sphinx-doc`_. All required dependencies are listed in `requirementsDocs.txt` | ||
* - py36-{github,readthedocs-latest,readthedocs-stable}-integrationtests | ||
- Start the Selenium Integration Tests for existing deployments, some type of Smoke Tests, see :ref:`development-process-test-integrationtest`. | ||
|
||
|
||
`.travis.yml` | ||
| Build config for the `TravisCI`_ Job, used for testing different python versions. | ||
| **Status:** |Travis CI build status| | ||
.. _sphinx-doc: `link-sphinx`_ | ||
|
||
.. include:: ../links.rst |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ Index | |
|
||
self | ||
usage | ||
development/index |
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 was deleted.
Oops, something went wrong.
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,12 @@ | ||
import pytest | ||
import sys, os | ||
|
||
@pytest.fixture | ||
def chrome_options(chrome_options): | ||
chrome_options.add_argument('headless') | ||
return chrome_options | ||
|
||
def test_example(selenium): | ||
selenium.get(os.environ["SELENIUM_BASE_URL"]) | ||
# selenium.save_screenshot('/tmp/screenshot/sample_screenshot_1.png'); | ||
assert "Cookiecutter Template for circleci BuildJobs — Cookiecutter CircleCI Pipeline documentation" in selenium.title |
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,2 @@ | ||
pytest-cookies==0.3.0 | ||
cookiecutter==1.6.0 |
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,6 @@ | ||
sphinx==1.8.3 | ||
sphinxcontrib-plantuml==0.14 | ||
sphinxcontrib-ansibleautodoc==0.0.5 | ||
sphinx_rtd_theme==0.4.2 | ||
PyYAML==3.13 | ||
m2r==0.2.1 |
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,2 @@ | ||
pytest==4.0.2 | ||
pytest-selenium==1.15.0 |
Oops, something went wrong.