Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Ansible Lint

on:
push:
branches: [main, master]
paths:
- "ansible/**"
pull_request:
branches: [main, master]
paths:
- "ansible/**"

jobs:
ansible-lint:
name: Ansible Lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install ansible-lint
run: pip install ansible-lint

- name: Run ansible-lint
run: ansible-lint ansible/*.yml --exclude ansible/configs/
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
lint-python:
name: Lint Python
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install flake8
run: pip install flake8

- name: Run flake8
run: flake8 tests/ --max-line-length=120 --extend-ignore=E501

lint-yaml:
name: Lint YAML
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install yamllint
run: pip install yamllint

- name: Run yamllint
run: yamllint ansible/ containerlab/

test-collection:
name: Test Collection
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install test dependencies
run: pip install pytest netmiko paramiko

- name: Collect tests (syntax check)
run: pytest tests/ --collect-only -q
10 changes: 10 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default

rules:
line-length:
max: 150
truthy:
allowed-values: ['true', 'false', 'yes', 'no']
document-start:
level: warning
1 change: 0 additions & 1 deletion ansible/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
- name: Generate Device Configurations and Documentation
ansible.builtin.import_role:
name: arista.avd.eos_cli_config_gen

2 changes: 1 addition & 1 deletion ansible/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

- name: Deploy Configurations to Devices
ansible.builtin.import_role:
name: arista.avd.eos_config_deploy_eapi
name: arista.avd.eos_config_deploy_eapi
3 changes: 2 additions & 1 deletion containerlab/clab-topology.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: multi-dc-evpn
topology:
kinds:
Expand Down Expand Up @@ -204,7 +205,7 @@ topology:
exec:
- ip addr add 192.168.140.20/24 dev eth1
- ip route add default via 192.168.140.8

graphite:
kind: linux
image: netreplica/graphite:latest
Expand Down
1 change: 0 additions & 1 deletion tests/test_fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest
from netmiko import ConnectHandler
from paramiko.ssh_exception import SSHException, AuthenticationException
import time


class NetworkFabric:
Expand Down
Loading