Skip to content

Test: New cvp integration molecule test #2

Test: New cvp integration molecule test

Test: New cvp integration molecule test #2

---
name: "deploy_to_cv testing"
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
# ----------------------------------- #
# Test Requirements
# ----------------------------------- #
python_requirements:

Check failure on line 14 in .github/workflows/new-cvp-integration.yml

View workflow run for this annotation

GitHub Actions / deploy_to_cv testing

Invalid workflow file

The workflow is not valid. .github/workflows/new-cvp-integration.yml (Line: 14, Col: 3): The workflow must contain at least one job with no dependencies.
name: Test Python requirements installation
runs-on: ubuntu-latest
needs: [ pre_commit ]
if: needs.file-changes.outputs.requirements == 'true'
strategy:
fail-fast: true
matrix:
python_version: [ "3.9", "3.10", "3.11", "3.12" ]
steps:
- name: 'Set environment variables'
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: 'Install Python requirements'
run: |
pip install -r ansible_collections/arista/avd/requirements.txt -r ansible_collections/arista/avd/requirements-dev.txt --upgrade
# ----------------------------------- #
# DEPLOY_TO_CV MOLECULE
# ----------------------------------- #
molecule_deploy_to_cv:
name: Run molecule test for new cvp integration
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
avd_scenario:
- 'deploy_to_cv'
ansible_version:
- 'ansible-core<2.17.0 --upgrade'
# Also test minimum ansible version for one scenario.
# include:
# - avd_scenario: 'eos_cli_config_gen'
# ansible_version: 'ansible-core==2.14.0'
needs: [ pre_commit ]
if: needs.file-changes.outputs.config_gen == 'true'
steps:
- name: 'Set environment variables'
env:
CVAAS_TOKEN: ${{ secrets.CVAAS_TOKEN }}
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.7
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'converge'
molecule_args: '--scenario-name ${{ matrix.avd_scenario }}'
pip_file: ansible_collections/arista/avd/requirements.txt
galaxy_file: "ansible_collections/arista/avd/collections.yml"
ansible: ${{ matrix.ansible_version }}
check_git: true
check_git_enforced: true
# - uses: actions/upload-artifact@v3
# with:
# name: molecule-${{ matrix.avd_scenario }}-artifacts
# path: ${PWD}/ansible_collections/arista/avd/molecule/${{ matrix.avd_scenario }}