Skip to content

Commit 7fc04b1

Browse files
committed
ci: add GitHub Actions workflow and basic smoke tests
1 parent e72fb42 commit 7fc04b1

4 files changed

Lines changed: 58 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
python-version: ["3.10", "3.11"]
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
cache: "pip"
24+
25+
- name: Upgrade pip
26+
run: python -m pip install --upgrade pip
27+
28+
- name: Install package with dev dependencies
29+
run: |
30+
pip install .[dev]
31+
32+
- name: Check formatting (black)
33+
run: |
34+
black --check src
35+
36+
- name: Lint (flake8)
37+
run: |
38+
flake8 src
39+
40+
- name: Type check (mypy)
41+
run: |
42+
mypy src/voxcpm || true
43+
44+
- name: Run tests
45+
run: |
46+
pytest

.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
launch.json
2-
__pycache__
3-
voxcpm.egg-info
4-
.DS_Store
1+
launch.json
2+
__pycache__
3+
voxcpm.egg-info
4+
.DS_Store
5+
6+
build/
7+
dist/
8+
*.egg-info/

tests/test_cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_cli_import():
2+
from voxcpm.cli import main

tests/test_import.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_import_voxcpm():
2+
import voxcpm

0 commit comments

Comments
 (0)