From 76b399999ec42a29237fd86e4eeab459b52da2b6 Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 22 Mar 2021 20:51:52 +0100 Subject: [PATCH] remove not working molecule test --- .travis.yml | 27 ---------- README.md | 10 +++- molecule/default/converge.yml | 9 ---- molecule/default/molecule.yml | 43 ---------------- molecule/default/prepare.yml | 27 ---------- molecule/default/tests/test_default.py | 25 --------- requirements-travis.txt | 70 -------------------------- 7 files changed, 8 insertions(+), 203 deletions(-) delete mode 100644 .travis.yml delete mode 100644 molecule/default/converge.yml delete mode 100644 molecule/default/molecule.yml delete mode 100644 molecule/default/prepare.yml delete mode 100644 molecule/default/tests/test_default.py delete mode 100644 requirements-travis.txt diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 62da97c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -language: python -python: - - "3.7" - -env: - matrix: - - MOLECULE_DISTRO: centos8 - - MOLECULE_DISTRO: centos7 - - MOLECULE_DISTRO: ubuntu2004 - - MOLECULE_DISTRO: ubuntu1804 - - MOLECULE_DISTRO: ubuntu1604 - - MOLECULE_DISTRO: debian10 - - MOLECULE_DISTRO: debian9 - - MOLECULE_DISTRO: fedora33 - -services: - - docker - -install: - - python -m pip -q install -r requirements-travis.txt - -script: - - molecule test - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/README.md b/README.md index 9a511a2..2290c5e 100644 --- a/README.md +++ b/README.md @@ -242,5 +242,11 @@ Mastodon [@l3d@chaos.social](https://chaos.social/@l3d). I'm happy to fix any issue that's been opened, or even better, review your pull requests :) ## Testing -There is a test that is using [molecule](https://molecule.readthedocs.io/en/stable-1.22/usage.html). And some linting tests with github actions. -*For locale molecule testing docker is required.* +There are some tests that will validate linting. A good testing CI Pipeline that will work withe the used systemd commands is still needed. + +| test status | Github Marketplace | +| :--------- | :---------------- | +| [![Galaxy release](https://github.com/roles-ansible/ansible_role_gitea/actions/workflows/galaxy.yml/badge.svg)](https://github.com/roles-ansible/ansible_role_gitea/actions/workflows/galaxy.yml) | [publish-ansible-role-to-galaxy](https://github.com/marketplace/actions/publish-ansible-role-to-galaxy) | +| [![Yamllint GitHub Actions](https://github.com/roles-ansible/ansible_role_gitea/actions/workflows/yamllint.yaml/badge.svg)](https://github.com/roles-ansible/ansible_role_gitea/actions/workflows/yamllint.yaml) | [yamllint-github-action](https://github.com/marketplace/actions/yamllint-github-action) | +| [![Ansible Lint check](https://github.com/roles-ansible/ansible_role_gitea/actions/workflows/ansible-linting-check.yml/badge.svg)](https://github.com/roles-ansible/ansible_role_gitea/actions/workflows/ansible-linting-check.yml) | [ansible-lint action](https://github.com/marketplace/actions/ansible-lint) + diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml deleted file mode 100644 index 828005f..0000000 --- a/molecule/default/converge.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Converge - hosts: all - become: true - roles: - - ansible-role-gitea - vars: - gitea_http_domain: localhost - gitea_root_url: http://localhost diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml deleted file mode 100644 index c72fc04..0000000 --- a/molecule/default/molecule.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -dependency: - name: galaxy - -driver: - name: docker - -lint: | - set -e - yamllint . - ansible-lint - -platforms: - - name: instance - image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1804}-ansible:latest - pre_build_image: true - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: true - - -provisioner: - name: ansible - playbooks: - prepare: prepare.yml - converge: converge.yml - -scenario: - test_sequence: - - lint - - destroy - - syntax - - create - - prepare - - converge - - verify - - destroy - -verifier: - name: testinfra - lint: - name: flake8 diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml deleted file mode 100644 index 4c3c05a..0000000 --- a/molecule/default/prepare.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: Prepare - hosts: all - become: true - tasks: - - name: install dependencies for gitea (RedHat based systems) - yum: - name: "{{ redhat_packages }}" - state: present - update_cache: true - when: ansible_os_family == "RedHat" - - name: install dependencies for gitea (Debian based systems) - apt: - name: "{{ debian_packages }}" - state: present - update_cache: true - when: ansible_os_family == "Debian" - - vars: - debian_packages: - - git - - curl - - xz-utils - redhat_packages: - - git - - curl - - xz diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py deleted file mode 100644 index bc93aa1..0000000 --- a/molecule/default/tests/test_default.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -import testinfra.utils.ansible_runner - -testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( - os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') - - -def test_gitea_binary(host): - gitea_bin = host.file('/usr/local/bin/gitea') - assert gitea_bin.exists - assert gitea_bin.user == 'root' - assert gitea_bin.group == 'root' - -def test_gitea_config_file(host): - gitea_config = host.file('/etc/gitea/gitea.ini') - assert gitea_config.exists - assert gitea_config.mode == 0o600 - -def test_gitea_service_running(host): - gitea = host.service('gitea') - assert gitea.is_running - -def test_gitea_reachable(host): - gitea_http = host.run('curl http://localhost:3000') - assert gitea_http.rc == 0 diff --git a/requirements-travis.txt b/requirements-travis.txt deleted file mode 100644 index 0cd9a66..0000000 --- a/requirements-travis.txt +++ /dev/null @@ -1,70 +0,0 @@ -ansible==2.10.7 -ansible-lint==5.0.0 -anyconfig==0.10.0 -atomicwrites==1.4.0 -attrs==20.3.0 -autopep8==1.5.5 -bcrypt==3.2.0 -arrow==0.15.5 -asn1crypto==0.24.0 -binaryornot==0.4.4 -Cerberus==1.3.2 -certifi==2020.12.5 -cffi==1.14.4 -chardet==4.0.0 -click==7.1.2 -click-completion==0.5.2 -click-help-colors==0.9 -colorama==0.4.4 -cookiecutter==1.7.2 -cryptography==3.3.1 -cryptography==3.3.2 -docker==4.4.1 -docker-pycreds==0.4.0 -entrypoints==0.3 -fasteners==0.15 -flake8==3.7.7 -future==0.18.2 -git-url-parse==1.2.1 -idna==2.9 -importlib-metadata==1.6.0 -Jinja2==2.11.3 -jinja2-time==0.2.0 -MarkupSafe==1.1.1 -mccabe==0.6.1 -molecule==3.0.3 -monotonic==1.5 -more-itertools==8.6.0 -paramiko==2.7.2 -pathspec==0.8.1 -pbr==5.5.1 -pexpect==4.8.0 -pi==0.1.2 -pluggy==0.13.1 -poyo==0.5.0 -psutil==5.6.6 -ptyprocess==0.6.0 -py==1.8.0 -pyasn1==0.4.5 -pycodestyle==2.5.0 -pycparser==2.20 -pyflakes==2.1.1 -PyNaCl==1.3.0 -pytest==4.3.1 -python-dateutil==2.8.1 -python-gilt==1.2.3 -PyYAML==5.3.1 -requests==2.23.0 -ruamel.yaml==0.16.10 -ruamel.yaml.clib==0.2.0 -sh==1.12.14 -shellingham==1.3.2 -six==1.14.0 -tabulate==0.8.7 -testinfra==6.0.0 -tree-format==0.1.2 -urllib3==1.26.3 -websocket-client==0.57.0 -whichcraft==0.6.1 -yamllint==1.26.0 -zipp==3.4.0