Skip to content

Commit

Permalink
fix ci (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoesel authored Jun 6, 2024
1 parent 196cf38 commit 787833e
Show file tree
Hide file tree
Showing 17 changed files with 565 additions and 174 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ filters: &semver-tagged
executors:
pytest:
machine:
# use an older ubuntu image with python 3.11 until pytest 8.0 is out
# python 3.11, needed for ansible-test 2.15
image: ubuntu-2204:2023.10.1
resource_class: large

Expand All @@ -34,6 +34,7 @@ jobs:
steps:
- collection-testing/pytest:
pytest-args: >
--ci
--ansible-version << parameters.ansible-version >>
--node-python-version << parameters.node-python-version >>
Expand Down
8 changes: 5 additions & 3 deletions .config/molecule/config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
---
dependency:
name: galaxy
options:
requirements-file: requirements.molecule.yml

driver:
name: docker

provisioner:
name: ansible
env:
ANSIBLE_PIPELINING: true
ANSIBLE_PIPELINING: false

scenario:
test_sequence:
- destroy
- dependency
- syntax
- destroy
- create
- prepare
- converge
- idempotence
- check # also run check mode in regular tests
- check # also run check mode in regular tests
- side_effect
- verify
- destroy
Expand Down
11 changes: 10 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"extends": [
"github>maxhoesel-ansible/.github:renovate-config"
]
],
"pip-compile": {
"fileMatch": ["^requirements\\.txt$"]
},
"pip_requirements": {
"enabled": false
},
"pip_setup": {
"enabled": false
}
}
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ The CI also builds the docs to ensure they don't break silently.

## Maintainer information

### Updating Dependencies

While the *Ansible* collection itself doesn't have any dependencies outside of ansible itself, the tooling used to build and test the collection does.
We use [`pip-tools`](https://github.com/jazzband/pip-tools/) to lock these dependencies to a specific version for testing.
This prevents random CI failures because of [`requests` updates et. al.](https://github.com/docker/docker-py/pull/3257), but still gives us a simple `requirements.txt` that anyone can install.

The direct dependencies are stored in `requirements.in`, use `scripts/udate_requirements.sh` to generate a new `requirements.txt`.
Do **not** generate `requirements.txt` in another way or remove the header, else renovate [won't be able to resolve and update dependencies in CI!](https://docs.renovatebot.com/modules/manager/pip-compile/#assumption-of-header-with-a-command)

### Bumping supported ansible-core versions

1. Update the versions in the [CI config](./.circleci/config.yml)
Expand Down
53 changes: 26 additions & 27 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
authors:
- Max Hösel <[email protected]>
- Max Hösel <[email protected]>
build_ignore:
- .circleci
- .github
- .config
- .vscode
- dist
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- .yamllint
- '*.tar.gz'
- .venv
- .tox
- .pytest_cache
- scripts
- .pre-commit-config.yaml
- .readthedocs.yaml
- pyproject.toml
- requirements.txt
- '**/requirements.txt'
- .circleci
- .github
- .vscode
- dist
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- .yamllint
- "*.tar.gz"
- .venv
- .tox
- .pytest_cache
- scripts
- .pre-commit-config.yaml
- .readthedocs.yaml
- pyproject.toml
- requirements.txt
- "**/requirements.txt"
dependencies:
ansible.posix: '>=1.0,<2.0'
ansible.posix: ">=1.0,<2.0"
description: Collection dealing with Proxmox VE and PBS hosts
issues: https://github.com/maxhoesel-ansible/ansible-collection-proxmox/issues
license:
- GPL-3.0-or-later
license_file: ''
- GPL-3.0-or-later
license_file: ""
name: proxmox
namespace: maxhoesel
readme: README.md
repository: https://github.com/maxhoesel-ansible/ansible-collection-proxmox
tags:
- proxmox
- lxc
- kvm
- virtualization
- pbs
- proxmox
- lxc
- kvm
- virtualization
- pbs
version: 5.1.1
40 changes: 40 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file is only a template!
# Use requirements.txt generated by pip-compile to install dependencies

# Requirements for developing this collection
# Includes utilities, CLI helpers and so on

# Include a version of ansible-core for IDE hints and the default pytest version
# It is also needed for docs generation.
#
# This installed version can be overriden by running pytest with the --ansible-version command.
# Ideally pytest would install another venv just for the test, but the pytest-virtualenv package
# is ancient and incompatible with python 3.12.
ansible-core==2.16.6

# Libraries used by modules
proxmoxer==2.0.1

# Linting & Formatting
ansible-lint==24.5.0
pylint==3.2.0
autopep8==2.1.0
pre-commit==3.7.1

# Utility packages used in test fixtures and scripts
pytest==8.2.1
docker==7.1.0
pyyaml==6.0.1
packaging==24.0
# Dependencies for executing the role scenarios.
molecule==6.0.2
molecule-plugins[docker]==23.4.1

# Generating requirements and syncing venv
pip-tools==7.4.1

# Docs
antsibull-docs==2.11.0
ansible-pygments==0.1.1
sphinx==7.3.7
sphinx-ansible-theme==0.10.3
Loading

0 comments on commit 787833e

Please sign in to comment.