Skip to content

Commit

Permalink
Merge pull request #43 from buluma/testing
Browse files Browse the repository at this point in the history
Merge Testing
  • Loading branch information
buluma authored Jul 19, 2024
2 parents b29c683 + 2a7aa8a commit 469a59b
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 53 deletions.
3 changes: 0 additions & 3 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ exclude_paths:
- .github
- requirements.yml

skip_list:
- yaml[truthy]

enable_list:
- name[prefix]
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Pull request
about: Describe the proposed change

---

**Describe the change**
A clear and concise description of what the pull request is.

**Testing**
In case a feature was added, how were tests performed?
36 changes: 16 additions & 20 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
- main
- testing
- dependabot/**
# - renovate/**
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
Expand All @@ -21,8 +20,7 @@ on:
pull_request:
pull_request_target:
schedule:
# - cron: '37 19 19 * *'
- cron: '37 19 * * *'
- cron: '37 19 19/19 * *'

workflow_dispatch:

Expand All @@ -36,58 +34,56 @@ jobs:
lint:
runs-on: ubuntu-20.04
steps:
- name: checkout
- name: Checkout Role
uses: actions/checkout@v4
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main
- name: Run Ansible-lint
uses: ansible/ansible-lint@v24.7.0
test:
needs:
- lint
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config:
- image: "alpine-openrc"
tag: "latest"
- image: "amazonlinux"
tag: "latest"
- image: "docker-molecule-images"
tag: "alpine-openrc"
- image: "docker-molecule-images"
tag: "amazonlinux2023"
- image: "enterpriselinux"
tag: "8"
- image: "enterpriselinux"
tag: "latest"
- image: "docker-molecule-images"
tag: "buster"
- image: "docker-molecule-images"
tag: "bullseye"
- image: "docker-molecule-images"
tag: "37"
- image: "docker-molecule-images"
tag: "38"
- image: "docker-molecule-images"
tag: "39"
- image: "docker-molecule-images"
tag: "40"
- image: "docker-molecule-images"
tag: "rawhide"
- image: "docker-molecule-images"
tag: "opensuse"
- image: "docker-molecule-images"
tag: "focal"
tag: "ubuntu_latest"
- image: "docker-molecule-images"
tag: "bionic"
tag: "focal"
- image: "docker-molecule-images"
tag: "jammy"
- image: "docker-molecule-images"
tag: "lunar"
tag: "noble"
steps:
- name: Checkout Role
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Running Molecule Test
uses: buluma/molecule-action@v24.2.0
uses: buluma/molecule-action@v24.6.17
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
- name: Running Role Test
run: ansible-galaxy role import --api-key ${{ secrets.galaxy_api_key }} buluma ${{ github.event.repository.name }}

dependabot:
needs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
- uses: release-drafter/release-drafter@master
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
with:
config-name: release-drafter.yml
Expand Down
36 changes: 23 additions & 13 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
---
extends: default

# https://ansible.readthedocs.io/projects/lint/rules/yaml/#octals
rules:
comments:
# https://github.com/prettier/prettier/issues/6780
min-spaces-from-content: 1
# https://github.com/adrienverge/yamllint/issues/384
comments-indentation: false
document-start: disable
# 160 chars was the default used by old E204 rule, but
# you can easily change it or disable in your .yamllint file.
line-length:
max: 310
# We are adding an extra space inside braces as that's how prettier does it
# and we are trying not to fight other linters.
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
line-length: disable
truthy:
check-keys: false

ignore: |
.tox/
.cache/
min-spaces-inside: 0 # yamllint defaults to 0
max-spaces-inside: 1 # yamllint defaults to 0
# key-duplicates:
# forbid-duplicated-merge-keys: true # not enabled by default
octal-values:
forbid-implicit-octal: true # yamllint defaults to false
forbid-explicit-octal: true # yamllint defaults to false
# quoted-strings:
# quote-type: double
# required: only-when-needed
6 changes: 0 additions & 6 deletions meta/exception.yml

This file was deleted.

3 changes: 0 additions & 3 deletions meta/preferences.yml

This file was deleted.

4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ansible-compat == 4.*
ansible-compat == 24.*
molecule == 24.*
molecule-plugins[docker] == 23.*
ansible-lint == 24.*
paramiko == 3.*
# Pinning requests version due to [bug](https://github.com/docker/docker-py/issues/3113)
# requests == 2.28.1
requests == 2.28.1
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- name: Manage selinux booleans
ansible.posix.seboolean:
name: "{{ item.name }}"
state: "{{ item.state | default('true') }}"
state: "{{ item.state | default('yes') }}"
persistent: "{{ item.persistent }}"
loop: "{{ selinux_booleans }}"
loop_control:
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
#
[tox]
minversion = 4.2.4
# Ansible 7 is disabled, causing issues with Fedora:
# https://github.com/ansible/ansible/issues/81199#event-9773321055
# envlist = py3-ansible{7,8,9}
envlist = py3-ansible{8,9}

skipsdist = true

[testenv]
deps =
-rrequirements.txt
ansible7: ansible == 7.*
ansible8: ansible == 8.*
ansible9: ansible == 9.*
ansible10: ansible == 10.*

commands = molecule test
setenv =
TOX_ENVNAME={envname}
Expand Down

0 comments on commit 469a59b

Please sign in to comment.