separated github dependent websites

This commit is contained in:
Thephaseless 2024-10-27 18:46:19 +00:00
parent 542603b246
commit bf6b908102
3 changed files with 16 additions and 5 deletions

View File

@ -93,6 +93,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: GITHUB_BUILD=true
- name: Upload error logs
if: ${{ failure() }}

View File

@ -2,6 +2,9 @@ FROM python:3.12-alpine
# Inspired by https://github.com/Hudrolax/uc-docker-alpine/
ARG GITHUB_BUILD=false
ENV GITHUB_BUILD=${GITHUB_BUILD}
# Install build dependencies
RUN apk update && apk upgrade && \
apk add --no-cache --virtual .build-deps \

View File

@ -1,3 +1,4 @@
import os
from http import HTTPStatus
from time import sleep
@ -14,13 +15,19 @@ client = TestClient(app)
test_websites = [
"https://btmet.com/",
"https://ext.to/",
# Not testable on github actions
# "https://www.ygg.re/",
# "https://extratorrent.st/",
# "https://idope.se/",
# "https://speed.cd/login",
]
# Not testable on github actions
github_restricted = [
"https://www.ygg.re/",
"https://extratorrent.st/",
"https://idope.se/",
"https://speed.cd/login",
]
if os.getenv("GITHUB_ACTIONS") == "true":
test_websites.extend(github_restricted)
@pytest.mark.parametrize("website", test_websites)
def test_bypass(website: str):