Skip to content

Commit e984da1

Browse files
authored
Merge pull request #1 from jkawamoto/ci
Add GitHub Actions workflow for Python app CI
2 parents a21d1aa + 63b0b41 commit e984da1

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.github/workflows/python-app.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Python Application
2+
on:
3+
push:
4+
branches: [main]
5+
tags:
6+
- "v*.*.*"
7+
pull_request:
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v5
16+
with:
17+
enable-cache: true
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version-file: pyproject.toml
22+
- name: Install the project
23+
run: uv sync --all-extras --dev
24+
- name: Check files
25+
run: uv run pre-commit run -a

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Youtube Transcript MCP Server
2+
[![Python Application](https://github.com/jkawamoto/mcp-youtube-transcript/actions/workflows/python-app.yaml/badge.svg)](https://github.com/jkawamoto/mcp-youtube-transcript/actions/workflows/python-app.yaml)
3+
[![GitHub License](https://img.shields.io/github/license/jkawamoto/mcp-youtube-transcript)](https://github.com/jkawamoto/mcp-youtube-transcript/blob/main/LICENSE)
24

35
This MCP server retrieves transcripts for given YouTube video URLs.
46

tests/test_server.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This software is released under the MIT License.
66
#
77
# http://opensource.org/licenses/mit-license.php
8-
8+
import os
99
from typing import AsyncGenerator
1010

1111
import pytest
@@ -35,6 +35,7 @@ async def test_list_tools(mcp_client_session: ClientSession) -> None:
3535
assert any(tool.name == "get_transcript" for tool in res.tools)
3636

3737

38+
@pytest.mark.skipif(os.getenv("CI") == "true", reason="Skipping this test on CI")
3839
@pytest.mark.anyio
3940
async def test_get_transcript(mcp_client_session: ClientSession) -> None:
4041
video_id = "LPZh9BOjkQs"
@@ -52,6 +53,7 @@ async def test_get_transcript(mcp_client_session: ClientSession) -> None:
5253
assert not res.isError
5354

5455

56+
@pytest.mark.skipif(os.getenv("CI") == "true", reason="Skipping this test on CI")
5557
@pytest.mark.anyio
5658
async def test_get_transcript_with_language(mcp_client_session: ClientSession) -> None:
5759
video_id = "WjAXZkQSE2U"
@@ -69,6 +71,7 @@ async def test_get_transcript_with_language(mcp_client_session: ClientSession) -
6971
assert not res.isError
7072

7173

74+
@pytest.mark.skipif(os.getenv("CI") == "true", reason="Skipping this test on CI")
7275
@pytest.mark.anyio
7376
async def test_get_transcript_fallback_language(
7477
mcp_client_session: ClientSession,
@@ -99,6 +102,7 @@ async def test_get_transcript_invalid_url(mcp_client_session: ClientSession) ->
99102
assert res.isError
100103

101104

105+
@pytest.mark.skipif(os.getenv("CI") == "true", reason="Skipping this test on CI")
102106
@pytest.mark.anyio
103107
async def test_get_transcript_not_found(mcp_client_session: ClientSession) -> None:
104108
res = await mcp_client_session.call_tool(

0 commit comments

Comments
 (0)