Skip to content

Wireless profile workflow - Fixed bugs and added UT #749

Wireless profile workflow - Fixed bugs and added UT

Wireless profile workflow - Fixed bugs and added UT #749

Workflow file for this run

---
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 6 * * *'
env:
NAMESPACE: cisco
COLLECTION_NAME: dnac
jobs:
sanity:
name: Sanity (Ⓐ${{ matrix.ansible }})
timeout-minutes: 60
strategy:
matrix:
ansible:
- stable-2.17
- stable-2.18
- stable-2.19
- devel
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
path: cisco-en-programmability/dnacenter-ansible
- name: Create directory
run: mkdir -p ./ansible_collections/${{env.NAMESPACE}}
- name: Move repository
run: mv ./cisco-en-programmability/dnacenter-ansible ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Add swap space (2 GB)
run: |
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Run sanity tests
run: |
if [ "${{ matrix.ansible }}" = "devel" ]; then
echo "⚠ Running reduced tests for devel branch"
ansible-test sanity --docker -v --color --test pep8 --test validate-modules
else
ansible-test sanity --docker -v --color
fi
working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}
- name: Dump docker logs (if any)
if: failure()
run: |
echo "🧪 Collecting logs from Docker containers..."
docker ps -a
docker logs $(docker ps -aq --filter name=ansible-test-controller || true) || true