Test: New cvp integration molecule test #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: "Collection code 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 GitHub Actions / Collection code testingInvalid workflow file
|
||
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_eos_cli_config_gen: | ||
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 }} |