Skip to content

Commit

Permalink
Pin requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellweg committed Jul 29, 2024
1 parent 3c1f0e4 commit 976f9ae
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 $@
Expand Down
10 changes: 5 additions & 5 deletions requirements-lint.txt
Original file line number Diff line number Diff line change
@@ -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
20 changes: 8 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 976f9ae

Please sign in to comment.