From 6815225798b66f01aec69e19252226b8fb2cce07 Mon Sep 17 00:00:00 2001 From: omcal Date: Sat, 29 Jun 2024 16:51:21 +0300 Subject: [PATCH] fix: Split req.txt into req-dev.txt for development dependencies - Split req.txt - Bumped python version (#91) Signed-off-by: Rishi Mondal Signed-off-by: Boris Glimcher <36732377+glimchb@users.noreply.github.com> --- .github/workflows/ansible.yml | 28 ++++++++-------------------- Dockerfile | 6 +++--- meta/execution-environment.yml | 4 +++- requirements-dev.txt | 3 +++ requirements.txt | 5 +---- 5 files changed, 18 insertions(+), 28 deletions(-) create mode 100644 requirements-dev.txt diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml index 673be37..f66c8a3 100644 --- a/.github/workflows/ansible.yml +++ b/.github/workflows/ansible.yml @@ -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 @@ -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 }} @@ -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 diff --git a/Dockerfile b/Dockerfile index 1dc1e46..65e2a0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/meta/execution-environment.yml b/meta/execution-environment.yml index dad7f84..09a95de 100644 --- a/meta/execution-environment.yml +++ b/meta/execution-environment.yml @@ -2,4 +2,6 @@ version: 3 dependencies: galaxy: requirements.yml - python: requirements.txt + python: + - requirements.txt + - requirements-dev.txt diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..1ef9543 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,3 @@ +antsibull-changelog>=0.25.0 +antsibull-docs>=2.7.0 +ansible-lint>=6.22.2 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 148a3a8..888d48c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1 @@ -python-dateutil>=2.8.2 -antsibull-changelog>=0.25.0 -antsibull-docs>=2.7.0 -ansible-lint>=6.22.2 \ No newline at end of file +python-dateutil>=2.8.2 \ No newline at end of file