mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Merge pull request #11 from roles-ansible/actions
remove not working molecule test
This commit is contained in:
commit
251b526574
7 changed files with 8 additions and 203 deletions
27
.travis.yml
27
.travis.yml
|
@ -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/
|
10
README.md
10
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)
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
become: true
|
||||
roles:
|
||||
- ansible-role-gitea
|
||||
vars:
|
||||
gitea_http_domain: localhost
|
||||
gitea_root_url: http://localhost
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in a new issue