Skip to content

Rs 31.1.1 ansible collection #732

Rs 31.1.1 ansible collection

Rs 31.1.1 ansible collection #732

Workflow file for this run

name: CI
on:
push:
branches:
- "eng"
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+"
pull_request:
jobs:
test:
name: Test alb collection
runs-on: ubuntu-latest
env:
ANSIBLE_SKIP_CONFLICT_CHECK: 1
HOME: "/home/runner"
strategy:
matrix:
ansible: [2.15.0]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python 3.10.16
uses: actions/setup-python@v5
with:
python-version: 3.10.16
- name: Get Python and Pip version
run: echo $(pip --version)
- name: Install ansible-base (v${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Build a collection tarball
run: ansible-galaxy collection build
- name: Install the collection tarball
run: ansible-galaxy collection install *.tar.gz
- name: Run unit tests
run: ansible-test units --docker -v --color --truncate 0 --python 3.10
working-directory: ${{ env.HOME }}/.ansible/collections/ansible_collections/vmware/alb
- name: Run ansible sanity tests
run: ansible-test sanity --docker -v --color --truncate 0 --python 3.10
working-directory: ${{ env.HOME }}/.ansible/collections/ansible_collections/vmware/alb
# Always install galaxy-importer after the unit tests are finished as it is overriding the existing
# ansible installation. Ref: https://github.com/ansible/ansible/issues/76361
# - name: Install galaxy-importer
# run: ANSIBLE_SKIP_CONFLICT_CHECK=${{ env.ANSIBLE_SKIP_CONFLICT_CHECK }} pip install galaxy-importer
# - name: Create galaxy-importer directory
# run: sudo mkdir -p /etc/galaxy-importer
# - name: Create galaxy-importer.cfg
# run: sudo cp ${{ env.HOME }}/.ansible/collections/ansible_collections/vmware/alb/.github/workflows/galaxy-importer.cfg /etc/galaxy-importer/galaxy-importer.cfg
# - name: Run galaxy-importer check
# run: python -m galaxy_importer.main ${GITHUB_WORKSPACE}/vmware-*.tar.gz | tee ${GITHUB_WORKSPACE}/log.txt
# - name: Check errors
# run: if grep -E 'ERROR' ${GITHUB_WORKSPACE}/log.txt; then exit 1; else exit 0; fi