Skip to content

Commit 2ccd89a

Browse files
committed
Update GitHub Actions workflows
- Add macOS test environment - Improve test and build process using uv - Use official PyPI publish action - Fix pipeline configurations
1 parent 9d34216 commit 2ccd89a

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
name: Publish
2+
23
on:
34
push:
45
tags:
56
- "v*"
7+
8+
jobs:
9+
test:
610
strategy:
711
matrix:
12+
os: [ubuntu-latest, macos-latest]
813
python-version: ["3.11"]
914

10-
jobs:
11-
test:
12-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
1316
steps:
1417
- uses: actions/checkout@v4
1518

@@ -23,14 +26,13 @@ jobs:
2326
python -m pip install --upgrade pip
2427
pip install uv
2528
26-
- name: Install dev/test dependencies
29+
- name: Install dependencies
2730
run: |
28-
pip install -e ".[dev]"
29-
pip install -e ".[test]"
31+
uv pip install -e ".[dev,test]"
3032
31-
- name: Run tests
33+
- name: Run tests and checks
3234
run: |
33-
make check
35+
make all
3436
3537
publish:
3638
needs: test
@@ -44,14 +46,13 @@ jobs:
4446

4547
- name: Update version from tag
4648
run: |
47-
# Strip 'v' prefix from tag and update version.py
4849
VERSION=${GITHUB_REF#refs/tags/v}
4950
echo "__version__ = \"${VERSION}\"" > src/mcp_shell_server/version.py
5051
51-
- name: Set up Python ${{ matrix.python-version }}
52+
- name: Set up Python 3.11
5253
uses: actions/setup-python@v5
5354
with:
54-
python-version: ${{ matrix.python-version }}
55+
python-version: "3.11"
5556

5657
- name: Install uv
5758
run: |
@@ -60,10 +61,10 @@ jobs:
6061
6162
- name: Build package
6263
run: |
63-
uv build
64+
uv pip install build
65+
python -m build
6466
6567
- name: Publish to PyPI
66-
env:
67-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
68-
run: |
69-
uv publish --token $PYPI_TOKEN
68+
uses: pypa/gh-action-pypi-publish@release/v1
69+
with:
70+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: ubuntu-latest
1211
strategy:
1312
matrix:
13+
os: [ubuntu-latest, macos-latest]
1414
python-version: ["3.11"]
1515

16+
runs-on: ${{ matrix.os }}
1617
steps:
1718
- uses: actions/checkout@v4
1819

@@ -26,18 +27,17 @@ jobs:
2627
python -m pip install --upgrade pip
2728
pip install uv
2829
29-
- name: Install dev/test dependencies
30+
- name: Install dependencies
3031
run: |
31-
pip install -e ".[dev]"
32-
pip install -e ".[test]"
32+
uv pip install -e ".[dev,test]"
3333
34-
- name: Run lint and typecheck
34+
- name: Run format checks and typecheck
3535
run: |
36-
make lint typecheck
36+
make check
3737
3838
- name: Run tests with coverage
3939
run: |
40-
pytest --cov --cov-report=xml
40+
make coverage
4141
4242
- name: Upload coverage to Codecov
4343
uses: codecov/codecov-action@v5

0 commit comments

Comments
 (0)