-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (38 loc) · 1.62 KB
/
max-complexity.yml
File metadata and controls
43 lines (38 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Check if query might hit max complexity
# Might be strange, but checking details of seasons/episodes can result with errors regarding
# max complexity of query being reached.
# This workflow will run actual request for "The Simpsons" ("ts20711") with "best_only=False"
# (the largest response I could find) to check if it errors out.
# It won't prevent errors due to too large searches, but should check if it's impossible
# to get details of something "as is", due to too complex query.
name: Query complexity
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
verify:
name: Check if max query complexity is reached
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "Install Python"
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Check search complexity
run: uv run python -c "from simplejustwatchapi import search; search('The', count=100, best_only=False)"
- name: Check details complexity
run: uv run python -c "from simplejustwatchapi import details; details('ts20711', best_only=False)"
- name: Check seasons complexity
run: uv run python -c "from simplejustwatchapi import seasons; seasons('ts20711', best_only=False)"
- name: Check episodes complexity
run: uv run python -c "from simplejustwatchapi import episodes; episodes('tss21924', best_only=False)"