Skip to content

Commit 3b1899c

Browse files
committed
Add test workflow
1 parent 3160472 commit 3b1899c

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Test
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build_wheels:
11+
name: Test on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install
25+
run: |
26+
script/setup --dev
27+
28+
- name: Run tests
29+
run: script/test

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## 1.0.2
44

55
- Fix license
6+
- Drop Python 3.8 support
67

78
## 1.0.1
89

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.12",
2525
"Programming Language :: Python :: 3.13",
2626
]
27-
requires-python = ">=3.8.0"
27+
requires-python = ">=3.9.0"
2828

2929
[project.urls]
3030
"Source Code" = "http://github.com/rhasspy/pyring-buffer"

script/setup

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
#!/usr/bin/env python3
2+
import argparse
23
import subprocess
34
import venv
45
from pathlib import Path
56

67
_DIR = Path(__file__).parent
78
_PROGRAM_DIR = _DIR.parent
89
_VENV_DIR = _PROGRAM_DIR / ".venv"
10+
_MODULE_DIR = _PROGRAM_DIR / "src" / "piper"
11+
12+
parser = argparse.ArgumentParser()
13+
parser.add_argument("--dev", action="store_true", help="Install dev requirements")
14+
args = parser.parse_args()
915

1016
# Create virtual environment
1117
builder = venv.EnvBuilder(with_pip=True)
@@ -18,4 +24,8 @@ subprocess.check_call(pip + ["install", "--upgrade", "pip"])
1824
subprocess.check_call(pip + ["install", "--upgrade", "setuptools", "wheel"])
1925

2026
# Install requirements
21-
subprocess.check_call(pip + ["install", "-e", f"{_PROGRAM_DIR}[dev]"])
27+
subprocess.check_call(pip + ["install", "-e", str(_PROGRAM_DIR)])
28+
29+
if args.dev:
30+
# Install dev requirements
31+
subprocess.check_call(pip + ["install", "-e", f"{_PROGRAM_DIR}[dev]"])

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
env_list =
3-
py{38,39,310,311,312,313}
3+
py{39,310,311,312,313}
44
minversion = 4.12.1
55

66
[testenv]

0 commit comments

Comments
 (0)