mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 09:50:20 +08:00
separated github dependent websites
This commit is contained in:
parent
542603b246
commit
bf6b908102
1
.github/workflows/docker-publish.yml
vendored
1
.github/workflows/docker-publish.yml
vendored
@ -93,6 +93,7 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
build-args: GITHUB_BUILD=true
|
||||||
|
|
||||||
- name: Upload error logs
|
- name: Upload error logs
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
|
@ -2,6 +2,9 @@ FROM python:3.12-alpine
|
|||||||
|
|
||||||
# Inspired by https://github.com/Hudrolax/uc-docker-alpine/
|
# Inspired by https://github.com/Hudrolax/uc-docker-alpine/
|
||||||
|
|
||||||
|
ARG GITHUB_BUILD=false
|
||||||
|
ENV GITHUB_BUILD=${GITHUB_BUILD}
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
RUN apk update && apk upgrade && \
|
RUN apk update && apk upgrade && \
|
||||||
apk add --no-cache --virtual .build-deps \
|
apk add --no-cache --virtual .build-deps \
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
@ -14,13 +15,19 @@ client = TestClient(app)
|
|||||||
test_websites = [
|
test_websites = [
|
||||||
"https://btmet.com/",
|
"https://btmet.com/",
|
||||||
"https://ext.to/",
|
"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)
|
@pytest.mark.parametrize("website", test_websites)
|
||||||
def test_bypass(website: str):
|
def test_bypass(website: str):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user