CI / test (3.10) (push) Failing after 56s
CI / test (3.11) (push) Failing after 50s
CI / test (3.12) (push) Failing after 43s
CI / test (3.10) (pull_request) Failing after 31s
CI / test (3.11) (pull_request) Failing after 33s
CI / test (3.12) (pull_request) Failing after 37s
Every CI run died at "pip install -e .[dev]": pyproject.toml asks for napalm_device_types, which lives in git.netork.io/NAPALM rather than on PyPI, and pip found only an unrelated 0.1.0 there. Not one test had run in CI. The workflow now installs napalm-device-types from git first. The matrix drops 3.8/3.9 and requires-python says >=3.10, because napalm-device-types itself needs 3.10 -- the package never installed on anything older. Replayed in a fresh venv: napalm-device-types 2.0.0 from git, then the package with its dev extras, tests green.
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["**"]
|
|
pull_request:
|
|
branches: ["**"]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
|
|
- name: Install package with dev extras
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
# napalm-device-types lives in git.netork.io/NAPALM, not on PyPI: without this
|
|
# pip looks there, finds an unrelated 0.1.0 and the job dies before any test.
|
|
python -m pip install "napalm-device-types @ git+https://git.netork.io/NAPALM/napalm-device-types.git"
|
|
python -m pip install -e ".[dev]"
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
python -m pytest -q --tb=short
|
|
|
|
- name: Build wheel and sdist
|
|
run: |
|
|
python -m pip install build
|
|
python -m build
|
|
|
|
- name: Upload dist artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist-${{ matrix.python-version }}
|
|
path: dist/* |