mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-23 05:10:29 -07:00
Adding a GitHub action to run ansible-test (#497)
As a first step to rehabilitate the google.cloud repository, adding actions to help ensure that the collection is still passing tests as changes are merged. Details: - ansible-devel was not added to the matrix since it may destablize the tests, primarily used to validate the collection. - running sanity tests reported over 100+ issues, backlogged to #498 before turning those on.
This commit is contained in:
parent
af3710889d
commit
f6d42b4bc1
2 changed files with 103 additions and 152 deletions
56
.github/workflows/ansible-test.yml
vendored
Normal file
56
.github/workflows/ansible-test.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
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.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 dependencies
|
||||
run: pip install -r requirements.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 --docker -v --color --python 3.8
|
Loading…
Add table
Add a link
Reference in a new issue