Skip to content

Commit c0607da

Browse files
committed
ci: simplify the http proxy e2e test
1 parent c9b0208 commit c0607da

3 files changed

Lines changed: 29 additions & 25 deletions

File tree

.github/workflows/e2e-http-proxy.yml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55

66
jobs:
77
e2e-http-proxy:
8-
name: HTTP Proxy E2E (${{ matrix.platform }}-${{ matrix.arch }})
8+
name: HTTP Proxy (${{ matrix.platform }}-${{ matrix.arch }})
99
runs-on: ${{ matrix.runs-on }}
10-
timeout-minutes: 60
10+
timeout-minutes: 20
1111
strategy:
1212
fail-fast: false
1313
matrix:
@@ -52,34 +52,15 @@ jobs:
5252
- name: Install all dependencies
5353
run: pnpm install --frozen-lockfile
5454

55-
- name: Install CJK fonts (Linux)
56-
if: matrix.platform == 'linux'
57-
run: |
58-
sudo apt-get update
59-
sudo apt-get install -y fonts-noto-cjk
60-
61-
- name: Setup Chrome
62-
id: setup-chrome
63-
uses: browser-actions/setup-chrome@v2
64-
with:
65-
chrome-version: '146.0.7680.153'
66-
install-dependencies: true
67-
install-chromedriver: true
68-
69-
- name: Run HTTP Proxy E2E test
55+
- name: Run reverse-proxy HTTP Proxy tests
7056
id: e2e
71-
run: bun ci/run-e2e-test.ts --spec "./test/specs/config/CustomTmdbHost-WithHttpProxy.e2e.ts"
72-
env:
73-
BUILD_ENV: docker
74-
USE_EMBEDDED_HTTP_PROXY: 'true'
75-
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
76-
CHROMEDRIVER: ${{ steps.setup-chrome.outputs.chromedriver-path }}
57+
run: pnpm e2e:http-proxy
7758

78-
- name: Upload E2E logs and reports
59+
- name: Upload logs
7960
if: always() && steps.e2e.outcome != 'skipped'
8061
uses: actions/upload-artifact@v4
8162
with:
82-
name: http-proxy-e2e-${{ matrix.platform }}-${{ matrix.arch }}-logs-${{ github.run_id }}
63+
name: http-proxy-${{ matrix.platform }}-${{ matrix.arch }}-logs-${{ github.run_id }}
8364
path: artifacts/cicd/
8465
if-no-files-found: ignore
8566
retention-days: 7
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "http-proxy-reverse-proxy",
3+
"outputDir": "./artifacts/cicd",
4+
"env": {
5+
"SMM_AUTH_TOKEN": "ChangeMe123"
6+
},
7+
"background": [
8+
{
9+
"name": "cli",
10+
"command": "pnpm e2e:cli"
11+
}
12+
],
13+
"tasks": [
14+
{
15+
"name": "reverse-proxy.test.ts",
16+
"command": "pnpm exec vitest run src/reverseProxy.test.ts",
17+
"cwd": "packages/core-routes"
18+
}
19+
],
20+
"stopOnFailure": true,
21+
"keepRawTimeline": true
22+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"e2e:tvdb": "bun ci/run-e2e-test.ts --spec \"./test/specs/tvdb/*.e2e.ts\"",
3939
"e2e:failover": "cross-env EXTERNAL_CONFIG_FILE_URL=\"http://localhost:8000/config.json\" bun ci/run-e2e-test.ts --spec ./test/specs/TmdbHostFailover.e2e.ts",
4040
"e2e:scrape-failover": "bun apps/cicd/run.ts -f apps/e2e/scenarios/scrape-failover-tmdb.test.json",
41+
"e2e:http-proxy": "bun apps/cicd/run.ts -f apps/e2e/scenarios/http-proxy-reverse-proxy.test.json",
4142
"typecheck": "pnpm run typecheck:core && pnpm run typecheck:core-routes && pnpm run typecheck:electron-common && pnpm run typecheck:cli && pnpm run typecheck:ui && pnpm run typecheck:e2e && pnpm run typecheck:electron && pnpm run typecheck:ohos-main",
4243
"typecheck:core": "cd packages/core && pnpm run typecheck",
4344
"typecheck:core-routes": "cd packages/core-routes && pnpm run typecheck",

0 commit comments

Comments
 (0)