Skip to content

Commit 495e859

Browse files
update ci
1 parent 28954e7 commit 495e859

File tree

4 files changed

+48
-64
lines changed

4 files changed

+48
-64
lines changed

.github/workflows/test-and-release.yml

Lines changed: 35 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,46 @@
1-
name: 'Test and Release Yakut'
1+
name: 'Test & Release'
22
on: push
33

4-
# Ensures that only one workflow is running at a time
5-
concurrency:
6-
group: ${{ github.workflow_sha }}
7-
cancel-in-progress: true
8-
94
jobs:
10-
yakut-test:
11-
name: Test Yakut
5+
test:
6+
name: Test
127
strategy:
138
fail-fast: false
149
matrix:
15-
# The Windows NPcap runner is an ordinary Windows machine with the NPcap driver installed manually.
16-
# We chose to do it this way because NPcap driver installation requires a reboot, which is difficult to
17-
# automate. The NPcap driver is required for the Cyphal/UDP transport tests to work.
18-
os: [ubuntu-22.04, windows-2019-npcap]
19-
python: ['3.8', '3.9', '3.10', '3.11']
20-
exclude: # We don't test Windows with old Python versions because it takes too much effort.
21-
- os: windows-2019-npcap
22-
python: 3.8
23-
- os: windows-2019-npcap
24-
python: 3.9
10+
os: [ ubuntu-latest ]
11+
py: [ '3.10', '3.11', '3.12', '3.13' ]
12+
# On Windows, we select the configurations we test manually because we only have a few runners,
13+
# and because the infrastructure is hard to maintain using limited resources.
14+
include:
15+
- { os: win-pcap, py: '3.12' }
2516
runs-on: ${{ matrix.os }}
17+
env:
18+
FORCE_COLOR: 1
2619
steps:
27-
- name: Check out
28-
uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: true
2923

30-
- name: Install Python3
31-
uses: actions/setup-python@v4
24+
- uses: actions/setup-python@v5
3225
with:
3326
python-version: ${{ matrix.python }}
3427

35-
- name: Log Python version
36-
run: python --version
37-
38-
- name: Install dependencies
28+
- name: Configure environment -- GNU/Linux
29+
if: ${{ runner.os == 'Linux' }}
3930
# language=bash
4031
run: |
41-
if [ "$RUNNER_OS" == "Linux" ]; then
42-
sudo apt-get --ignore-missing update || true
43-
sudo apt-get install -y linux-*-extra-$(uname -r) ncat
44-
sudo apt-get install -y libsdl2-2.0-0 # For PySDL2. On Windows/macOS the binaries are pulled from PyPI.
45-
sudo apt-get install -y libasound2-dev # For RtMidi.
46-
fi
47-
git submodule update --init --recursive
48-
python -m pip install --upgrade pip setuptools nox
49-
shell: bash
32+
python --version
33+
sudo apt-get --ignore-missing update || true
34+
sudo apt-get install -y linux-*-extra-$(uname -r) ncat
35+
sudo apt-get install -y libsdl2-2.0-0 # For PySDL2. On Windows/macOS the binaries are pulled from PyPI.
36+
sudo apt-get install -y libasound2-dev # For RtMidi.
5037
51-
- name: Run build and test
52-
# language=bash
53-
run: |
54-
nox --non-interactive --session test --python ${{ matrix.python }}
55-
nox --non-interactive --session lint
56-
shell: bash
57-
env:
58-
FORCE_COLOR: 1
38+
# Only one statement per step to ensure the error codes are not ignored by PowerShell.
39+
- run: python -m pip install --upgrade pip setuptools nox
40+
- run: nox --non-interactive --session test --python ${{ matrix.python }}
41+
- run: nox --non-interactive --session lint
5942

60-
- name: Upload diagnostics
61-
uses: actions/upload-artifact@v3
43+
- uses: actions/upload-artifact@v4
6244
if: (success() || failure())
6345
with:
6446
# The matrix is shown for convenience but this is fragile because the values may not be string-convertible.
@@ -68,20 +50,21 @@ jobs:
6850
path: "**/*.log"
6951
retention-days: 90
7052

71-
yakut-release:
72-
name: Release Yakut
53+
release:
54+
name: Release
7355
runs-on: ubuntu-latest
7456
if: contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main')
75-
needs: yakut-test
57+
needs: test
7658
steps:
7759
- name: Check out
78-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
61+
with:
62+
submodules: true
7963

8064
- name: Create distribution wheel
8165
# language=bash
8266
run: |
83-
git submodule update --init --recursive
84-
python -m pip install --upgrade pip setuptools wheel twine
67+
python -m pip install --upgrade packaging pip setuptools wheel twine
8568
python setup.py sdist bdist_wheel
8669
8770
- name: Get release version
@@ -95,7 +78,7 @@ jobs:
9578
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_YAKUT }}
9679

9780
- name: Push version tag
98-
uses: mathieudutour/github-tag-action@v6.1
81+
uses: mathieudutour/github-tag-action@v6.2
9982
with:
10083
github_token: ${{ secrets.GITHUB_TOKEN }}
10184
custom_tag: ${{ env.yakut_version }}

noxfile.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2020 OpenCyphal
1+
# Copyright (c) OpenCyphal
22
# This software is distributed under the terms of the MIT License.
33
# Author: Pavel Kirienko <[email protected]>
44
# type: ignore
@@ -15,7 +15,7 @@
1515
assert DEPS_DIR.is_dir(), "Invalid configuration"
1616

1717

18-
PYTHONS = ["3.8", "3.9", "3.10", "3.11"]
18+
PYTHONS = ["3.10", "3.11", "3.12", "3.13"]
1919

2020

2121
@nox.session(python=False)
@@ -50,9 +50,9 @@ def test(session):
5050

5151
# Now we can install dependencies for the full integration test suite.
5252
session.install(
53-
"pytest ~= 7.4",
54-
"pytest-asyncio ~= 0.21.0",
55-
"coverage ~= 7.4",
53+
"pytest ~= 8.3",
54+
"pytest-asyncio ~= 0.26.0",
55+
"coverage ~= 7.8",
5656
)
5757

5858
# The test suite generates a lot of temporary files, so we change the working directory.
@@ -104,14 +104,14 @@ def test(session):
104104
# 1. It requires access to the code generated by the test suite.
105105
# 2. It has to be run separately per Python version we support.
106106
# If the interpreter is not CPython, this may need to be conditionally disabled.
107-
session.install("mypy ~= 1.8")
108-
session.run("mypy", "--strict", *map(str, src_dirs))
107+
session.install("mypy ~= 1.15.0")
108+
session.run("mypy", *map(str, src_dirs))
109109

110110

111111
@nox.session(reuse_venv=True)
112112
def lint(session):
113-
session.install("pylint ~= 3.0.3")
113+
session.install("pylint ~= 3.3.7")
114114
session.run("pylint", "yakut", "tests")
115115

116-
session.install("black ~= 23.12")
116+
session.install("black ~= 25.1")
117117
session.run("black", "--check", ".")

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ zip_safe = False
4848
include_package_data = True
4949
packages = find:
5050
install_requires =
51-
pycyphal[transport-udp,transport-serial,transport-can-pythoncan] ~= 1.8
51+
pycyphal[transport-udp,transport-serial,transport-can-pythoncan] ~= 1.20
5252
ruamel.yaml < 0.18
5353
requests ~= 2.27
5454
simplejson ~= 3.17
@@ -116,7 +116,8 @@ no_implicit_optional = True
116116
warn_redundant_casts = True
117117
warn_unused_ignores = True
118118
show_error_context = True
119-
strict_equality = True
119+
strict_equality = False
120+
strict = False
120121
implicit_reexport = False
121122
# We don't want MyPy to go checking generated code and its dependencies.
122123
follow_imports = silent

yakut/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.13.3
1+
0.14.0

0 commit comments

Comments
 (0)