Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split req.txt into req-dev.txt for development dependencies (#44) #90

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Check warning

Code scanning / Scorecard

Pinned-Dependencies

score is 0: pipCommand not pinned by hash Click Remediation section below to solve this issue
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