diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70b643e..9097b4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: - name: "Set up Python" uses: "actions/setup-python@v5" with: - python-version: "3.10" + python-version: "3.12" - name: "Install dependencies" run: | pip install -r requirements-lint.txt @@ -38,10 +38,7 @@ jobs: - name: "Set up Python" uses: "actions/setup-python@v5" with: - python-version: "3.11" - - name: "Install Ansible" - run: | - pip install ansible-core~=2.17 + python-version: "3.12" - name: "Install dependencies" run: | make test-setup diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0846b9e..581cbed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,16 +41,13 @@ jobs: uses: "actions/setup-python@v5" with: python-version: "${{ matrix.python }}" - - name: "Install Ansible" - run: | - pip install git+https://github.com/ansible/ansible.git@${{ matrix.ansible }} - name: "Install dependencies" run: | if [ "${{matrix.lower_bounds}}" ] then - make test-setup-lower-bounds + make ANSIBLE_VERSION=${{ matrix.ansible }} test-setup-lower-bounds else - make test-setup + make ANSIBLE_VERSION=${{ matrix.ansible }} test-setup fi - name: "Run basic tests" run: | diff --git a/Makefile b/Makefile index 58aa7b1..c08a810 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(eval _$(PLUGIN_TYPE) := $(filter-out %__ DEPENDENCIES := $(METADATA) $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(_$(PLUGIN_TYPE))) $(foreach ROLE,$(ROLES),$(wildcard $(ROLE)/*/*)) $(foreach ROLE,$(ROLES),$(ROLE)/README.md) PYTHON_VERSION = $(shell python -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))') +ANSIBLE_VERSION = devel SANITY_OPTS = TEST = PYTEST = pytest -n 4 -v @@ -83,12 +84,12 @@ clean_%: FORCE $(MANIFEST) | tests/playbooks/vars/server.yaml ansible-playbook --tags teardown,cleanup -i tests/inventory/hosts 'tests/playbooks/$*.yaml' test-setup: requirements.txt | tests/playbooks/vars/server.yaml - pip install --upgrade pip - pip install -r requirements.txt + pip install --upgrade pip setuptools<72.0.0 + pip install git+https://github.com/ansible/ansible.git@$(ANSIBLE_VERSION) -r requirements.txt test-setup-lower-bounds: requirements.txt lower_bounds_constraints.lock | tests/playbooks/vars/server.yaml - pip install --upgrade pip - pip install -r requirements.txt -c lower_bounds_constraints.lock + pip install --upgrade pip setuptools<72.0.0 + pip install git+https://github.com/ansible/ansible.git@$(ANSIBLE_VERSION) -r requirements.txt -c lower_bounds_constraints.lock tests/playbooks/vars/server.yaml: cp $@.example $@ diff --git a/requirements-lint.txt b/requirements-lint.txt index a573e19..93220e4 100644 --- a/requirements-lint.txt +++ b/requirements-lint.txt @@ -1,5 +1,5 @@ -ansible -black -galaxy-importer -isort -yamllint +ansible~=10.2.0 +black~=24.4.2 +galaxy-importer~=0.4.24 +isort~=5.13.2 +yamllint~=1.35.1 diff --git a/requirements.txt b/requirements.txt index 19fbdc8..dd22794 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,10 @@ pulp-glue<0.27,>=0.20.0 -ansible_runner<2.3; python_version < '3.7' -ansible_runner; python_version >= '3.7' -flake8 -pylint -pycodestyle -voluptuous -pytest>=4.4.0 -pytest-xdist -vcrpy - -# Temporary pin for a vcr bug -urllib3<2.0.0 +ansible_runner~=2.4.0 +flake8~=6.1.0 +pylint~=3.2.6 +pycodestyle~=2.11.1 +voluptuous~=0.15.2 +pytest~=8.3.2 +pytest-xdist~=3.6.1 +vcrpy~=6.0.1