ci: run the tests and build the package on every push and pull request #14

Merged
christianmanivong merged 2 commits from ci/workflow into master 2026-10-07 06:51:14 +00:00
Owner

Adds .github/workflows/ci.yml, the same job as napalm-fritzbox and napalm-opnsense: on every push and pull request, Python 3.10, 3.11 and 3.12, pytest, then wheel and sdist (upload-artifact@v3; v4 does not run on Gitea). napalm-device-types is installed from git.netork.io first, because PyPI has an unrelated package of that name.

The job was reproduced locally before this PR (fresh venv, Python 3.10 and 3.12, package build): green.

Adds `.github/workflows/ci.yml`, the same job as napalm-fritzbox and napalm-opnsense: on every push and pull request, Python 3.10, 3.11 and 3.12, `pytest`, then wheel and sdist (`upload-artifact@v3`; v4 does not run on Gitea). napalm-device-types is installed from git.netork.io first, because PyPI has an unrelated package of that name. The job was reproduced locally before this PR (fresh venv, Python 3.10 and 3.12, package build): green.
christianmanivong added 1 commit 2026-10-07 05:53:07 +00:00
ci: run the tests and build the package on every push and pull request
CI / test (3.10) (push) Successful in 1m39s
CI / test (3.11) (push) Successful in 1m37s
CI / test (3.12) (push) Failing after 1m24s
CI / test (3.10) (pull_request) Successful in 1m39s
CI / test (3.11) (pull_request) Successful in 1m38s
CI / test (3.12) (pull_request) Failing after 1m24s
80e9fc3c81
The same job as napalm-fritzbox and napalm-opnsense: Python 3.10, 3.11 and
3.12, pytest, then wheel and sdist. napalm-device-types comes from
git.netork.io first, because PyPI has an unrelated package of that name.
christianmanivong added 1 commit 2026-10-07 06:13:01 +00:00
test: destroy_vm on a stopped VM no longer spins for a minute and gigabytes
CI / test (3.10) (push) Successful in 34s
CI / test (3.11) (push) Successful in 31s
CI / test (3.12) (push) Successful in 35s
CI / test (3.10) (pull_request) Successful in 32s
CI / test (3.11) (pull_request) Successful in 32s
CI / test (3.12) (pull_request) Successful in 35s
0dc6fcb43a
test_destroy_vm_already_stopped left the stop task a bare MagicMock, so
_wait_for_task never saw "stopped" and looped for the full 60 s timeout
with time.sleep patched out. Every call landed in mock_calls: the test
took 60 s and up to 6 GB, and the new CI's 3.12 job was killed for it
(exit 137).

The stop call now raises, as Proxmox does for a VM that is not running --
which is the case the test is named for. The suite drops from 63 s to 4 s.
christianmanivong merged commit 0d71b98e6a into master 2026-10-07 06:51:14 +00:00
christianmanivong deleted branch ci/workflow 2026-10-07 06:51:14 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#14