Skip to content

AAP-79306 Detect incomplete manifests #5085

AAP-79306 Detect incomplete manifests

AAP-79306 Detect incomplete manifests #5085

Workflow file for this run

---
name: Testing DAB Consumers
on:
push:
branches:
- devel
- "stable-*"
pull_request:
jobs:
awx:
name: AWX
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Pull AWX devel image
run: docker pull ghcr.io/ansible/awx_devel:devel
# Generate a docker image that includes current DAB
- name: Create image for AWX devel that includes our DAB
run: |
mkdir awx-dockerfile
cat <<EOF > awx-dockerfile/Dockerfile
FROM ghcr.io/ansible/awx_devel:devel
COPY . /opt/dab/
RUN pip install -e /opt/dab/
RUN pip install jq
EOF
docker build -t awx-with-dab:latest -f awx-dockerfile/Dockerfile .
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ansible/awx
path: awx
persist-credentials: false
- name: Run AWX tests in the generated image
run: |
cd awx
DEVEL_IMAGE_NAME=awx-with-dab:latest AWX_DOCKER_CMD=/start_tests.sh make docker-runner
env:
PYTEST_ADDOPTS: --disable-warnings
eda-server:
name: eda-server
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
env:
EDA_SECRET_KEY: 'test'
EDA_DB_PASSWORD: 'secret'
services:
postgres:
image: 'quay.io/sclorg/postgresql-15-c9s:latest'
env:
POSTGRESQL_USER: eda
POSTGRESQL_PASSWORD: secret
POSTGRESQL_ADMIN_PASSWORD: secret
POSTGRESQL_DATABASE: eda
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- '5432:5432'
redis:
image: 'quay.io/fedora/redis-6:latest'
ports:
- '6379:6379'
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
show-progress: false
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ansible/eda-server
path: eda-server
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Run eda-server tests
run: |
DAB_PATH="$PWD"
mv eda-server /tmp
cd /tmp/eda-server
pipx install poetry
poetry install -E all --only main,test
poetry run pip install -e "$DAB_PATH"
poetry run pip show django-ansible-base
poetry run pytest
env:
PYTEST_ADDOPTS: --disable-warnings
jewel:
name: jewel
runs-on: ubuntu-24.04
permissions:
contents: read
strategy:
fail-fast: false
env:
TOX_DOCKER_GATEWAY: "0.0.0.0"
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: dab
show-progress: false
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ansible/jewel
path: jewel
persist-credentials: false
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev libxmlsec1-dev
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Install tox
run: pip install tox tox-docker requests
- name: Place DAB in jewel checkout
run: cp -a dab jewel/django-ansible-base
- name: Create tox environment
working-directory: jewel
env:
GATEWAY_TEST_DIRS: ""
run: |
tox -e py312 \
-x testenv:py312.docker= \
-- --collect-only aap_gateway_api/tests/__init__.py
- name: Rebuild lxml and xmlsec from source
working-directory: jewel
run: |
XMLSEC_VERSION=$(.tox/py312/bin/pip freeze | grep xmlsec | sed 's:^.*=::')
LXML_VERSION=$(.tox/py312/bin/pip freeze | grep lxml | sed 's:^.*=::')
echo "Rebuilding xmlsec==${XMLSEC_VERSION} and lxml==${LXML_VERSION} from source"
.tox/py312/bin/pip install --no-cache-dir --no-binary lxml,xmlsec --force-reinstall \
lxml==${LXML_VERSION} xmlsec==${XMLSEC_VERSION}
- name: Run jewel tests
working-directory: jewel
env:
PYTEST_NUM_PROCESSES: auto
PYTEST_ADDOPTS: --disable-warnings
run: tox -e py312 -- -m "not perf"
hub:
name: hub
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ansible/galaxy_ng
path: hub
persist-credentials: false
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev gettext
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.12'
- name: Install tox
run: pip install --only-binary ':all:' tox==4.53.0
- name: Run Hub unit tests
working-directory: hub
env:
DJANGO_ANSIBLE_BASE_BRANCH: ${{ github.sha }}
run: tox -e py312