Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from ngine-io/tests
Browse files Browse the repository at this point in the history
enable tests
  • Loading branch information
resmo authored Jul 15, 2020
2 parents 44232a9 + c5a6244 commit 25dfa5e
Show file tree
Hide file tree
Showing 7 changed files with 420 additions and 61 deletions.
118 changes: 59 additions & 59 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
runner-os:
- ubuntu-latest
ansible-version:
- git+https://github.com/ansible/ansible.git@devel
- devel
runner-python-version:
- 3.8
- 3.6
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.runner-python-version }}
Expand All @@ -37,7 +37,7 @@ jobs:
pip
install
--user
${{ matrix.ansible-version }}
https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz
- name: Build a collection tarball
run: >-
~/.local/bin/ansible-galaxy
Expand All @@ -52,59 +52,59 @@ jobs:
collection
path: .cache/collection-tarballs

# sanity-test-collection-via-containers:
# name: Sanity in container via Python ${{ 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/exoscale
sanity-test-collection-via-containers:
name: Sanity in container via Python ${{ 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:
- 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
https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz
- 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/exoscale
2 changes: 2 additions & 0 deletions plugins/module_utils/exoscale.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2016, René Moser <[email protected]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type

import os

Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/exo_dns_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
description:
- Create and remove domain records.
author: "René Moser (@resmo)"
version_added: "1.0.0"
version_added: "0.1.0"
options:
name:
description:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/exo_dns_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
description:
- Create, update and delete records.
author: "René Moser (@resmo)"
version_added: "1.0.0"
version_added: "0.1.0"
options:
name:
description:
Expand Down
6 changes: 6 additions & 0 deletions tests/legacy/exoscale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- hosts: localhost
gather_facts: no
roles:
- role: test_exoscale_dns
tags: test_exoscale_dns
4 changes: 4 additions & 0 deletions tests/legacy/roles/test_exoscale_dns/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
exo_dns_domain_name: example.com
exo_dns_record_name_web: web
exo_dns_record_name_mx: mx
Loading

0 comments on commit 25dfa5e

Please sign in to comment.