aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
284 stars 202 forks source link

CI: Parallelize tox runs in Github Actions #4129

Closed gmuloc closed 3 months ago

gmuloc commented 3 months ago

Change Summary

Tox can run in paralle in Github action rather than one after each other. This will speed run of tox

Component(s) name

ci pyavd

Proposed changes

Run in parallel 3.9, 3.10, coverage for 3.11 and 3.12

How to test

CI succeeds for each run, coverage present for 3.11

Checklist

Repository Checklist

github-actions[bot] commented 3 months ago

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4129
# Activate the virtual environment
source test-avd-pr-4129/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/gmuloc/avd.git@parallelize-tox#subdirectory=python-avd" --force
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/gmuloc/avd.git#/ansible_collections/arista/avd/,parallelize-tox --force
# Optional: Install AVD examples
cd test-avd-pr-4129
ansible-playbook arista.avd.install_examples