Skip to content

Commit 5b10c43

Browse files
committed
tox: test with libyang master by default
Add special case for the devel branch. Currently, the devel branch fails to parse one of our module... Signed-off-by: Robin Jarry <robin@jarry.cc>
1 parent 6cd3b21 commit 5b10c43

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
toxenv: py39
3838
- python: "3.10"
3939
toxenv: py310
40+
- python: "3.11"
41+
toxenv: py311
4042
- python: pypy3.9
4143
toxenv: pypy3
4244
steps:
@@ -53,6 +55,22 @@ jobs:
5355
- run: python -m pip install --upgrade tox
5456
- run: python -m tox -e ${{ matrix.toxenv }}
5557

58+
libyang_devel:
59+
runs-on: ubuntu-20.04
60+
steps:
61+
- uses: actions/checkout@v3
62+
- uses: actions/setup-python@v4
63+
with:
64+
python-version: 3.x
65+
- uses: actions/cache@v3
66+
with:
67+
path: ~/.cache/pip
68+
key: pip
69+
restore-keys: pip
70+
- run: python -m pip install --upgrade pip setuptools wheel
71+
- run: python -m pip install --upgrade tox
72+
- run: python -m tox -e lydevel
73+
5674
coverage:
5775
runs-on: ubuntu-latest
5876
steps:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2018-2020 Robin Jarry
1+
# Copyright (c) 2018-2023 Robin Jarry
22
# SPDX-License-Identifier: MIT
33

44
all: lint tests
@@ -7,7 +7,7 @@ lint:
77
tox -e lint
88

99
tests:
10-
tox -e py37
10+
tox -e py3
1111

1212
format:
1313
tox -e format

tox-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ download()
3232
# build and install libyang into the virtualenv
3333
src="${LIBYANG_SRC:-$venv/.src}"
3434
if ! [ -d "$src" ]; then
35-
libyang_branch="${LIBYANG_BRANCH:-devel}"
35+
libyang_branch="${LIBYANG_BRANCH:-master}"
3636
download "https://github.com/CESNET/libyang" "$libyang_branch" "$src"
3737
fi
3838

tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = format,lint,py{36,37,38,39,310,py3},coverage
2+
envlist = format,lint,py{36,37,38,39,310,311,py3,3},lydevel,coverage
33
skip_missing_interpreters = true
44
isolated_build = true
55
distdir = {toxinidir}/dist
@@ -15,6 +15,10 @@ allowlist_externals =
1515
{toxinidir}/tox-install.sh
1616
commands = python -Wd -m unittest discover -c
1717

18+
[testenv:lydevel]
19+
setenv =
20+
LIBYANG_BRANCH=devel
21+
1822
[testenv:coverage]
1923
changedir = .
2024
deps = coverage

0 commit comments

Comments
 (0)