Skip to content

Commit

Permalink
fix: Split req.txt into req-dev.txt for development dependencies
Browse files Browse the repository at this point in the history
- Split req.txt
- Bumped python version (opiproject#91)

Signed-off-by: Rishi Mondal <[email protected]>
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
omcal authored and MAVRICK-1 committed Jul 17, 2024
1 parent abf862f commit 6815225
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
ansible-version: [stable-2.17, stable-2.15, stable-2.16]
exclude:
# Ansible-core 2.16 is supported only from Python 3.10 onwards
- python-version: "3.9"
ansible-version: stable-2.16
python-version: ["3.10", "3.11"]
ansible-version: [stable-2.15, stable-2.16, stable-2.17]

steps:
- name: Perform unit testing with ansible-test
uses: ansible-community/ansible-test-gh-action@release/v1
uses: ansible-community/ansible-test-gh-action@v1.15.0
with:
testing-type: units
coverage: always
Expand All @@ -80,16 +76,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
ansible-version: [stable-2.17, stable-2.15, stable-2.16]
exclude:
# Ansible-core 2.16 is supported only from Python 3.10 onwards
- python-version: "3.9"
ansible-version: stable-2.16
python-version: ["3.10", "3.11"]
ansible-version: [stable-2.15, stable-2.16, stable-2.17]

steps:
- name: Perform sanity testing
uses: ansible-community/ansible-test-gh-action@release/v1
uses: ansible-community/ansible-test-gh-action@v1.15.0
with:
ansible-core-version: ${{ matrix.ansible-version }}
target-python-version: ${{ matrix.python-version }}
Expand All @@ -104,12 +96,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
ansible-version: [stable-2.17, stable-2.15, stable-2.16]
exclude:
# Ansible-core 2.16 is supported only from Python 3.10 onwards
- python-version: "3.9"
ansible-version: stable-2.16
python-version: ["3.10", "3.11", "3.12"]
ansible-version: [stable-2.15, stable-2.16, stable-2.17]

steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM python:3.11
ARG ANSIBLE_VERSION=stable-2.16
RUN pip install --no-cache-dir --disable-pip-version-check https://github.com/ansible/ansible/archive/${ANSIBLE_VERSION}.tar.gz
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir --disable-pip-version-check --requirement /tmp/requirements.txt
COPY ./requirements.txt ./requirements-dev.txt /tmp/
RUN pip install --no-cache-dir --disable-pip-version-check --requirement /tmp/requirements.txt --requirement /tmp/requirements-dev.txt
COPY ./requirements.yml /tmp/requirements.yml
RUN ansible-galaxy collection install --ignore-certs --requirements-file /tmp/requirements.yml
COPY . /opt/
RUN ansible-galaxy collection install -vvv /opt
WORKDIR /opt/roles
ENTRYPOINT ["/usr/local/bin/ansible"]
CMD ["--version"]
CMD ["--version"]
4 changes: 3 additions & 1 deletion meta/execution-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
version: 3
dependencies:
galaxy: requirements.yml
python: requirements.txt
python:
- requirements.txt
- requirements-dev.txt
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
antsibull-changelog>=0.25.0
antsibull-docs>=2.7.0
ansible-lint>=6.22.2
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
python-dateutil>=2.8.2
antsibull-changelog>=0.25.0
antsibull-docs>=2.7.0
ansible-lint>=6.22.2
python-dateutil>=2.8.2

0 comments on commit 6815225

Please sign in to comment.