mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-17 16:37:33 +00:00
ci: ansible-lint requires dependencies to be installed [citest_skip]
ansible-lint requires the dependencies in meta/collection-requirements.yml and tests/collection-requirements.yml to be installed. tox-lsr 3.18.1 will ensure they are installed. Refactor the tests somewhat so that the collection and test steps are separate. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
parent
06d6f36229
commit
09f4336dee
5 changed files with 15 additions and 9 deletions
9
.github/workflows/ansible-lint.yml
vendored
9
.github/workflows/ansible-lint.yml
vendored
|
|
@ -44,17 +44,20 @@ jobs:
|
|||
- name: Install tox, tox-lsr
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.0"
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.1"
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ matrix.versions.python }}
|
||||
|
||||
- name: Convert role to collection format and run ansible-lint
|
||||
- name: Convert role to collection format
|
||||
run: tox -e collection
|
||||
|
||||
- name: Run ansible-lint
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
LSR_ANSIBLE_LINT_DEP="ansible-lint==${{ matrix.versions.ansible_lint }}" \
|
||||
LSR_ANSIBLE_LINT_ANSIBLE_DEP="ansible-core==${{ matrix.versions.ansible }}" \
|
||||
tox -x testenv:ansible-lint-collection.basepython="python${{ matrix.versions.python }}" \
|
||||
-e collection,ansible-lint-collection
|
||||
-e ansible-lint-collection
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ jobs:
|
|||
- name: Install tox, tox-lsr
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.0"
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.1"
|
||||
|
||||
- name: Run ansible-plugin-scan
|
||||
run: |
|
||||
|
|
|
|||
9
.github/workflows/ansible-test.yml
vendored
9
.github/workflows/ansible-test.yml
vendored
|
|
@ -47,15 +47,18 @@ jobs:
|
|||
- name: Install tox, tox-lsr
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.0"
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.1"
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ matrix.versions.python }}
|
||||
|
||||
- name: Convert role to collection format and run ansible-test
|
||||
- name: Convert role to collection format
|
||||
run: tox -e collection
|
||||
|
||||
- name: Run ansible-test
|
||||
run: |
|
||||
tox \
|
||||
-x testenv:ansible-test-${{ matrix.versions.ansible }}.basepython="python${{ matrix.versions.python }}" \
|
||||
-e collection,ansible-test-${{ matrix.versions.ansible }}
|
||||
-e ansible-test-${{ matrix.versions.ansible }}
|
||||
|
|
|
|||
2
.github/workflows/python-unit-test.yml
vendored
2
.github/workflows/python-unit-test.yml
vendored
|
|
@ -70,7 +70,7 @@ jobs:
|
|||
tox=tox
|
||||
virtualenv=virtualenv
|
||||
fi
|
||||
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.18.0"
|
||||
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.18.1"
|
||||
# If you have additional OS dependency packages e.g. libcairo2-dev
|
||||
# then put them in .github/config/ubuntu-requirements.txt, one
|
||||
# package per line.
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ jobs:
|
|||
python3 -m pip install --upgrade pip
|
||||
sudo apt update
|
||||
sudo apt install -y --no-install-recommends git ansible-core genisoimage qemu-system-x86
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.0"
|
||||
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.18.1"
|
||||
|
||||
# HACK: Drop this when moving this workflow to 26.04 LTS
|
||||
- name: Update podman to 5.x for compatibility with bootc-image-builder's podman 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue