google.cloud/.github/workflows/ansible-test.yml
Yusuke Tsutsumi eab8b1fb7b disable spanner_database_info tests, python to 3.9
The client's List continues to be flakey. disabling until
the endpoint is stable.

Switching tests to use ansible 2.14, as 2.13 has issues with
spawning a docker container.

Upgrading the base python version as a consequence.

Removing the need for docker from unit tests, since that was failing
and also non-critical to run unit tests.
2022-12-04 12:00:59 -08:00

58 lines
No EOL
2.1 KiB
YAML

name: "Run tests for the cloud.google collection"
on: [pull_request]
jobs:
# sanity tests cannot be turned on until #498 is resolved.
# sanity:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ansible_collections/google/cloud
# strategy:
# matrix:
# ansible_version:
# - stable-2.13
# - stable-2.11
# steps:
# - name: check out code
# uses: actions/checkout@v2
# with:
# path: ansible_collections/google/cloud
# - name: Set up Python
# uses: actions/setup-python@v1
# with:
# python-version: '3.8' # this is the minimum version required for Ansible 2.11
# - name: Install ansible-base (${{ matrix.ansible_version }})
# uses: nick-invision/retry@v2
# with:
# timeout_minutes: 3
# max_attempts: 3
# command: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
# - name: Run sanity tests
# run: ansible-test sanity --docker -v --color --python 3.8
unit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ansible_collections/google/cloud
strategy:
matrix:
ansible_version:
- stable-2.14
- stable-2.11
steps:
- name: check out code
uses: actions/checkout@v2
with:
path: ansible_collections/google/cloud
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.9' # this is the minimum version required for Ansible 2.14
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install test dependencies
run: pip install -r requirements-test.txt
- name: Install ansible-base (${{ matrix.ansible_version }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible_version }}.tar.gz --disable-pip-version-check
- name: Run unit tests
run: ansible-test units -v --color --python 3.9