Skip to content

Commit 6609fe2

Browse files
authored
Merge branch 'main' into makefile-etc
2 parents b803170 + a934fc9 commit 6609fe2

File tree

8 files changed

+439
-205
lines changed

8 files changed

+439
-205
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.8", "3.9", "3.10", "3.11"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install -e ".[dev]"
29+
30+
- name: Run tests
31+
run: |
32+
pytest tests/
33+
34+
lint:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: "3.8"
43+
44+
- name: Install dependencies
45+
run: |
46+
python -m pip install --upgrade pip
47+
pip install black isort mypy ruff
48+
49+
- name: Check formatting
50+
run: |
51+
black --check .
52+
isort --check .
53+
54+
- name: Type checking
55+
run: |
56+
mypy src/
57+
58+
- name: Lint
59+
run: |
60+
ruff check .

.github/workflows/publish.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI/CD
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
pypi-publish:
9+
name: Upload release to PyPI
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: release
13+
url: https://pypi.org/p/mockllm
14+
permissions:
15+
id-token: write
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.x'
25+
26+
- name: Install build tools
27+
run: |
28+
python -m pip install --upgrade build
29+
30+
- name: Build distributions
31+
run: |
32+
python -m build
33+
34+
- name: Publish package distributions to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
attestations: true

0 commit comments

Comments
 (0)