diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index e26843a7..ef187692 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -39,7 +39,7 @@ jobs: other_names: | lint integration - platforms: linux + platforms: linux,macos build: name: ${{ matrix.name }} runs-on: ${{ matrix.os || 'ubuntu-22.04' }} @@ -67,7 +67,8 @@ jobs: path: ansible_collections/ansible/eda submodules: true - - name: Install package dependencies + - name: Install package dependencies (ubuntu) + if: ${{ contains(matrix.os, 'ubuntu') }} run: | sudo apt-get update sudo apt-get --assume-yes --no-install-recommends install libsystemd0 libsystemd-dev pkg-config diff --git a/requirements.txt b/requirements.txt index 496858fd..487567f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ aiokafka azure-servicebus dpath kafka-python -psycopg +psycopg[binary,pool] # extras needed to avoid install failure on macos-aarch64 systemd-python; sys_platform != 'darwin' watchdog xxhash diff --git a/tests/unit/requirements.txt b/tests/unit/requirements.txt index d2449839..2ccb66d0 100644 --- a/tests/unit/requirements.txt +++ b/tests/unit/requirements.txt @@ -7,5 +7,5 @@ azure-servicebus dpath pytest<8 # https://github.com/ansible/ansible/issues/82713 pytest-asyncio -psycopg +psycopg[binary,pool] xxhash diff --git a/tox.ini b/tox.ini index 35228957..3787b870 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,8 @@ deps = -r test_requirements.txt commands_pre = bash -c 'test "$(basename $(cd ../.. && pwd))" == ansible_collections || { echo "Repository must be cloned inside a directory structure like ansible_collections/ansible/eda in order allow ansible-test to run."; exit 3;}' commands = + # fail-fast if psycopg in not properly installed. + python3 -c "import psycopg" ansible-test sanity ansible-test units --venv -v --num-workers 1 allowlist_externals =