Skip to content

Dynamic inventory plugin for Solace Cloud added. Documentation in REA… #615

Dynamic inventory plugin for Solace Cloud added. Documentation in REA…

Dynamic inventory plugin for Solace Cloud added. Documentation in REA… #615

Workflow file for this run

# Copyright (c) 2020, Solace Corporation, Ricardo Gomez-Ulmke, <[email protected]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
name: ansible-test
on:
# for testing
workflow_dispatch:
# # testing branches
# push:
# branches:
# - mtn-120
# schedule:
# # - cron: '0 1 * * THU'
# - cron: '0 2 * * *'
pull_request:
branches:
- main
env:
# DEBUG_FLAG: ${{ true }}
TEST_ANSIBLE_SOLACE_COLLECTION_DIR: "src/ansible_collections/solace/pubsub_plus"
PIP_DEVEL_REQUIREMENTS_FILE: "devel/devel.requirements.txt"
jobs:
ansbile_test:
# runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# 3.6 is always tested
python-version: [ '3.8.10' ]
ansible-version: [
# "ansible>=2.10.3,<2.11", # this is 2.10
# "ansible>=4.10.0,<5.0.0", # this is 2.11
"ansible>=5.1.0,<6.0.0" # this is 2.12
]
steps:
- name: Check Auth
if: github.event_name == 'workflow_dispatch' && github.actor != 'ricardojosegomezulmke'
run: |
echo "not authorized"
echo "{IS_AUTHORIZED}={false}" >> $GITHUB_OUTPUT
id: auth
- name: Cancel Workflow
if: ${{ always() && steps.auth.outputs.IS_AUTHORIZED == 'false' }}
uses: andymckay/[email protected]
- name: update packages
run: |
# some release files are missing ...
# sudo apt-get update
sudo apt-get install libyaml-dev
sudo apt-get install shellcheck
- name: check pre-installed versions
run: |
lsb_release -a
which python
python --version
which python3
python3 --version
- name: Checkout Current Branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
# vm comes with a pre-installed python3.6
# ansible-test will also use that
# ==> install all devel requirements on that python3.6 version first
# python 3.6 support only available up to 2.11 ansible_core
- name: set up python 3.6
uses: actions/setup-python@v4
with:
python-version: 3.6
- name: Install ansible and devel requirements for 3.6
env:
ANSIBLE_VERSION: "ansible>=2.10.3,<2.11"
run: |
python -m pip install --upgrade pip
pip install "$ANSIBLE_VERSION"
pip install -r "${TEST_ANSIBLE_SOLACE_COLLECTION_DIR}/requirements.txt"
pip install -r "${PIP_DEVEL_REQUIREMENTS_FILE}"
- name: setup python matrix version
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install ansible and devel requirements for matrix version
env:
ANSIBLE_VERSION: "${{ matrix.ansible-version }}"
run: |
python -m pip install --upgrade pip
pip install "$ANSIBLE_VERSION"
pip install -r "${TEST_ANSIBLE_SOLACE_COLLECTION_DIR}/requirements.txt"
pip install -r "${PIP_DEVEL_REQUIREMENTS_FILE}"
- name: Print versions
run: |
ansible --version
which ansible-test
pip3 show ansible-doc-extractor
- name: Run ansible-test
run: |
cd ${TEST_ANSIBLE_SOLACE_COLLECTION_DIR}
ansible-test sanity
###
# The End.