Skip to content

Commit 6798749

Browse files
[youtube-data-api] tests: setup e2e tests for github actions
1 parent 078b237 commit 6798749

File tree

3 files changed

+34
-30
lines changed

3 files changed

+34
-30
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run e2e tests for garf-youtube-data-api
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
UV_SYSTEM_PYTHON: 1
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python 3.13
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.13"
18+
- name: Setup uv
19+
uses: astral-sh/setup-uv@v5
20+
with:
21+
version: "0.5.4"
22+
enable-cache: true
23+
- name: Install dependencies
24+
run: |
25+
uv pip install pytest
26+
- name: Test ${{ matrix.library }}
27+
run: |
28+
cd libs/community/google/youtube/youtube-data-api/
29+
uv pip install -e .
30+
pytest tests/e2e
31+
env:
32+
GARF_YOUTUBE_DATA_API_KEY: ${{ secrets.GARF_YOUTUBE_DATA_API_KEY }}
33+
YOUTUBE_ID: ${{ secrets.YOUTUBE_ID }}

libs/community/google/youtube/youtube-data-api/test_youtube.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

libs/community/google/youtube/youtube-data-api/tests/e2e/test_lib.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
dotenv.load_dotenv()
2020

21-
api_client = api_clients.YouTubeDataApiClient(
22-
api_key=os.getenv('YOUTUBE_DATA_API_KEY')
23-
)
21+
api_client = api_clients.YouTubeDataApiClient()
2422
fetcher = report_fetcher.YouTubeDataApiReportFetcher(api_client=api_client)
2523

2624

0 commit comments

Comments
 (0)