Skip to content

Commit 5402092

Browse files
coderberryclaude
andcommitted
Add GitHub Actions workflows for testing and linting
- Set up GitHub Actions workflows for Python testing and linting - Add support for Python 3.12 in test matrix and classifiers - Run tests on multiple Python versions (3.7 through 3.12) - Configure linting with flake8, black, and mypy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 9571a9a commit 5402092

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

.github/workflows/python-lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Python Linting
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.12'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install -e .[dev]
24+
25+
- name: Lint with flake8
26+
run: |
27+
flake8 blockdoc tests
28+
29+
- name: Check formatting with black
30+
run: |
31+
black --check blockdoc tests
32+
33+
- name: Type check with mypy
34+
run: |
35+
mypy blockdoc

.github/workflows/python-tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Python Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install -e .[dev]
28+
29+
- name: Run tests with pytest
30+
run: |
31+
python -m pytest --cov=blockdoc
32+
33+
- name: Upload coverage to Codecov
34+
uses: codecov/codecov-action@v3
35+
with:
36+
fail_ci_if_error: false

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"Programming Language :: Python :: 3.9",
3131
"Programming Language :: Python :: 3.10",
3232
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
3334
"Topic :: Software Development :: Libraries :: Python Modules",
3435
"Topic :: Text Processing :: Markup",
3536
],

0 commit comments

Comments
 (0)