Skip to content

fix: ruff check --fix #31

fix: ruff check --fix

fix: ruff check --fix #31

name: test-containerlab
on:
push:
branches:
- master
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
workflow_dispatch:
concurrency:
group: test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 60
env:
PYTHONUNBUFFERED: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev,api]"
- name: Install Containerlab
run: |
curl -sL https://get.containerlab.dev | sudo -E bash
- name: Deploy Containerlab topology
env:
SRL_EULA_ACCEPT: "true"
run: |
sudo -E containerlab deploy -t tests/clab/e2e.clab.yaml --reconfigure
- name: Run test suite
env:
SRL_EULA_ACCEPT: "true"
run: |
pytest --cov=netpulse
- name: Destroy Containerlab topology
if: always()
run: |
sudo -E containerlab destroy -t tests/clab/e2e.clab.yaml || true