Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 20 additions & 143 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,126 +4,16 @@ on:
push:
branches:
- master
pull_request:
schedule:
- cron: 30 6 * * *

jobs:
build-collection-artifact:
name: Build collection
runs-on: ${{ matrix.runner-os }}
strategy:
matrix:
runner-os:
- ubuntu-latest
ansible-version:
- git+https://github.com/ansible/ansible.git@devel
runner-python-version:
- 3.8
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}
- name: Install Ansible ${{ matrix.ansible-version }}
run: >-
python -m
pip
install
--user
${{ matrix.ansible-version }}
- name: Build a collection tarball
run: >-
~/.local/bin/ansible-galaxy
collection
build
--output-path
"${GITHUB_WORKSPACE}/.cache/collection-tarballs"
- name: Store migrated collection artifacts
uses: actions/upload-artifact@v1
with:
name: >-
collection
path: .cache/collection-tarballs

sanity-test-collection-via-containers:
name: Sanity Py${{ matrix.python-version }}
needs:
- build-collection-artifact
runs-on: ${{ matrix.runner-os }}
strategy:
fail-fast: false
matrix:
runner-os:
- ubuntu-latest
runner-python-version:
- 3.6
ansible-version:
- git+https://github.com/ansible/ansible.git@devel
steps:
- name: Set up Python ${{ matrix.runner-python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.runner-python-version }}
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}-sanity-containers
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Ansible ${{ matrix.ansible-version }}
run: >-
python -m
pip
install
--user
${{ matrix.ansible-version }}
- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
with:
name: >-
collection
path: .cache/collection-tarballs
- name: Install the collection tarball
run: >-
~/.local/bin/ansible-galaxy
collection
install
.cache/collection-tarballs/*.tar.gz
- name: Run collection sanity tests
run: >-
~/.local/bin/ansible-test
sanity
--color
--requirements
--docker
-vvv
working-directory: >-
/home/runner/.ansible/collections/ansible_collections/ngine_io/cloudstack

integration-test:
name: Integration test group${{matrix.group}} Py${{ matrix.python-version }}
needs:
- build-collection-artifact
- sanity-test-collection-via-containers
runs-on: ${{ matrix.runner-os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
runner-os:
- ubuntu-latest
runner-python-version:
- 3.6
ansible-version:
- git+https://github.com/ansible/ansible.git@devel
python-version:
- 3.6
- 2.7
Expand All @@ -135,40 +25,26 @@ jobs:
uses: actions/checkout@v1
with:
path: ansible_collections/ngine_io/cloudstack
- name: Set up pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ github.ref }}
- name: Install Ansible ${{ matrix.ansible-version }}
run: >-
python -m
pip
install
--user
${{ matrix.ansible-version }}
- name: Install requirements
run: >-
python -m
pip
install
--user
-r requirements.txt
- name: Download migrated collection artifacts
uses: actions/download-artifact@v1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
name: >-
collection
path: .cache/collection-tarballs
- name: Install collection tarball
run: >-
~/.local/bin/ansible-galaxy
collection
install
${GITHUB_WORKSPACE}/.cache/collection-tarballs/*.gz
python-version: ${{ matrix.python-version }}

- name: Install ansible and collection dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
pip install -r requirements.txt

- name: Build and install collection
run: |
ansible-galaxy collection build .
ansible-galaxy collection install *.gz

- name: Run the tests
run: >-
~/.local/bin/ansible-test
ansible-test
integration
--docker
-v
Expand All @@ -179,9 +55,10 @@ jobs:
--continue-on-error
--coverage
shippable/cs/group${{ matrix.group }}/

- name: Generate coverage report.
run: >-
~/.local/bin/ansible-test
ansible-test
coverage xml
-v
--requirements
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
path: ansible_collections/ngine_io/cloudstack
- name: Set up Python
uses: actions/setup-python@v1
with:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sanity
on:
- pull_request

jobs:
sanity:
name: Sanity (${{ matrix.ansible }})
strategy:
matrix:
ansible:
- stable-2.10
- stable-2.9
- devel
runs-on: ubuntu-latest
steps:

- name: Check out code
uses: actions/checkout@v1
with:
path: ansible_collections/ngine_io/cloudstack

- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Run sanity tests
run: ansible-test sanity --docker -v --color --python 3.6
24 changes: 0 additions & 24 deletions tests/sanity/ignore-2.10.txt
Original file line number Diff line number Diff line change
@@ -1,24 +0,0 @@
plugins/modules/cs_disk_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_firewall.py validate-modules:parameter-list-no-elements
plugins/modules/cs_host.py validate-modules:parameter-list-no-elements
plugins/modules/cs_instance.py validate-modules:parameter-list-no-elements
plugins/modules/cs_ip_address.py validate-modules:parameter-list-no-elements
plugins/modules/cs_iso.py validate-modules:parameter-list-no-elements
plugins/modules/cs_loadbalancer_rule.py validate-modules:doc-required-mismatch
plugins/modules/cs_loadbalancer_rule.py validate-modules:parameter-list-no-elements
plugins/modules/cs_loadbalancer_rule_member.py validate-modules:parameter-list-no-elements
plugins/modules/cs_network.py validate-modules:parameter-list-no-elements
plugins/modules/cs_network_acl_rule.py validate-modules:parameter-list-no-elements
plugins/modules/cs_network_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_physical_network.py validate-modules:parameter-list-no-elements
plugins/modules/cs_portforward.py validate-modules:parameter-list-no-elements
plugins/modules/cs_project.py validate-modules:parameter-list-no-elements
plugins/modules/cs_resourcelimit.py validate-modules:invalid-ansiblemodule-schema
plugins/modules/cs_service_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_storage_pool.py validate-modules:parameter-list-no-elements
plugins/modules/cs_template.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vmsnapshot.py validate-modules:parameter-list-no-elements
plugins/modules/cs_volume.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vpc.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vpc_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vpn_customer_gateway.py validate-modules:parameter-list-no-elements
24 changes: 0 additions & 24 deletions tests/sanity/ignore-2.9.txt
Original file line number Diff line number Diff line change
@@ -1,24 +0,0 @@
plugins/modules/cs_disk_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_firewall.py validate-modules:parameter-list-no-elements
plugins/modules/cs_host.py validate-modules:parameter-list-no-elements
plugins/modules/cs_instance.py validate-modules:parameter-list-no-elements
plugins/modules/cs_ip_address.py validate-modules:parameter-list-no-elements
plugins/modules/cs_iso.py validate-modules:parameter-list-no-elements
plugins/modules/cs_loadbalancer_rule.py validate-modules:doc-required-mismatch
plugins/modules/cs_loadbalancer_rule.py validate-modules:parameter-list-no-elements
plugins/modules/cs_loadbalancer_rule_member.py validate-modules:parameter-list-no-elements
plugins/modules/cs_network.py validate-modules:parameter-list-no-elements
plugins/modules/cs_network_acl_rule.py validate-modules:parameter-list-no-elements
plugins/modules/cs_network_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_physical_network.py validate-modules:parameter-list-no-elements
plugins/modules/cs_portforward.py validate-modules:parameter-list-no-elements
plugins/modules/cs_project.py validate-modules:parameter-list-no-elements
plugins/modules/cs_resourcelimit.py validate-modules:invalid-ansiblemodule-schema
plugins/modules/cs_service_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_storage_pool.py validate-modules:parameter-list-no-elements
plugins/modules/cs_template.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vmsnapshot.py validate-modules:parameter-list-no-elements
plugins/modules/cs_volume.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vpc.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vpc_offering.py validate-modules:parameter-list-no-elements
plugins/modules/cs_vpn_customer_gateway.py validate-modules:parameter-list-no-elements