Skip to content

Commit

Permalink
reduce amount of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romeroalx committed Oct 7, 2024
1 parent af05903 commit b389503
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 16 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
matrix:
ansible:
- "2.12"
- "2.13"
- "2.14"
# - "2.13"
# - "2.14"
scenario:
- pdns-47
- pdns-48
- pdns-49
- pdns-master
- pdns-os-repos
# - pdns-47
# - pdns-48
# - pdns-49
# - pdns-master
# - pdns-os-repos
- systemd-no-overrides
fail-fast: false
steps:
Expand All @@ -38,3 +38,9 @@ jobs:
run: tox -- molecule test -s ${{ matrix.scenario }}
env:
ANSIBLE: ${{ matrix.ansible }}
- run: |
docker ps --all
docker image ls --all
docker run molecule_pdns/ubuntu:20.04 whoami
docker --version
if: always()
34 changes: 34 additions & 0 deletions molecule/resources/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
volumes: "{{ item.volumes | default(omit) }}"
with_items: "{{ molecule_service_instances }}"

- name: Show host information
shell: "docker ps --all"
register: ps

- debug: var=ps.stdout_lines

- name: Create the required Services instance(s)
docker_container:
name: "{{ item.name }}"
Expand All @@ -58,7 +64,35 @@
state: started
recreate: False
privileged: "yes"
restart_policy: on-failure
volumes:
# Mount the cgroups fs to allow SystemD to run into the containers
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
with_items: "{{ molecule_platform_instances }}"

- name: Get info on docker host and list images
community.docker.docker_host_info:
images: true
register: result

- name: Show host information
ansible.builtin.debug:
var: result.host_info

- name: Show host information
shell: "docker ps --all"
register: ps

- debug: var=ps.stdout_lines

- name: Show host information
shell: "docker ps --all | grep molecule_pdns/ubuntu | head -1 | awk '{print $1}'"
register: ps

- debug: var=ps.stdout_lines

- name: Show host information
shell: "docker logs $(docker ps --all | grep molecule_pdns/ubuntu | head -1 | awk '{print $1}')"
register: ps

- debug: var=ps.stdout_lines
1 change: 1 addition & 0 deletions molecule/resources/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- name: Prepare the Molecule Test Resources
hosts: pdns
gather_facts: false
tasks:
# Make sure the default MySQL and SQLite
# schemas are installed in /usr/share/doc/
Expand Down
10 changes: 6 additions & 4 deletions molecule/systemd-no-overrides/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ dependency:
name: galaxy

platforms:
- name: debian-10
groups: ["pdns"]
image: debian:10
dockerfile_tpl: debian-systemd
# - name: debian-10
# groups: ["pdns"]
# image: debian:10
# dockerfile_tpl: debian-systemd

- name: ubuntu-2004
groups: ["pdns"]
Expand All @@ -32,6 +32,8 @@ provisioner:
fact_caching_connection: .ansible_cache
fact_caching_timeout: 7200
remote_tmp: /tmp
stdout_callback: debug
stderr_callback: debug
ssh_connection:
pipelining: true
inventory:
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ skipsdist = true

[gh-actions:env]
ANSIBLE=
2.12: ansible212
2.13: ansible213
# 2.12: ansible212
# 2.13: ansible213
2.14: ansible214

[testenv]
passenv = *
deps =
-rtest-requirements.txt
ansible212: ansible-core>2.12,<2.13
ansible213: ansible-core>2.13,<2.14
# ansible212: ansible-core>2.12,<2.13
# ansible213: ansible-core>2.13,<2.14
ansible214: ansible-core>2.14,<2.15
setenv =
PY_COLORS = 1
commands =
{posargs:molecule test --all --destroy always}
{posargs:molecule test --all --destroy never}

0 comments on commit b389503

Please sign in to comment.