Repository navigation
93 lines (79 loc) · 3.21 KB
/
Copy pathstack.yml
File metadata and controls
93 lines (79 loc) · 3.21 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Real stack
# The production build of Questarr against real qBittorrent, Transmission and SABnzbd daemons
# and a fake Torznab/Newznab indexer: setup, connection tests, a grab from the library, the
# client's download and the import into the library (tests/stack/).
# Slow (real daemons, a minute per download check), so it runs weekly and on demand, plus on
# pull requests that change the journey itself.
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
pull_request:
branches: [main, release/*]
paths:
- ".github/workflows/stack.yml"
- "playwright.stack.config.ts"
- "tests/stack/**"
concurrency:
group: stack-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
stack:
name: Real-stack journey
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@ccd8616d44fd3846e67624a50d5aad6d37bf2d25 # v2.22.1
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6.2.0
with:
persist-credentials: false
- name: Setup Node.js 26.x
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 26.x
# Same accepted cache-poisoning trade-off as ci.yml (single maintainer with push access).
cache: "npm" # zizmor: ignore[cache-poisoning]
# The packaged transmission-daemon would start a system service on 9091 at install
# time, with DHT on, reaching dht.transmissionbt.com before it could be stopped. A
# policy-rc.d that refuses service starts keeps it down; the journey runs its own
# instance with its own profile on that port.
- name: Install download clients
run: |
printf '#!/bin/sh\nexit 101\n' | sudo tee /usr/sbin/policy-rc.d > /dev/null
sudo chmod +x /usr/sbin/policy-rc.d
sudo apt-get update -qq
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
qbittorrent-nox transmission-daemon sabnzbdplus p7zip-full
sudo rm -f /usr/sbin/policy-rc.d
sudo systemctl stop transmission-daemon || true
sudo systemctl disable transmission-daemon || true
# Lifecycle scripts are required: the server opens a real SQLite file through
# better-sqlite3's native binding.
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Build
run: npm run build
- name: Run the real-stack journey
run: npm run test:stack
env:
STACK_DIR: ${{ runner.temp }}/questarr-stack
QUESTARR_STACK_DATA: ${{ runner.temp }}/questarr-stack-data
- name: Upload report and logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: stack-report
path: |
playwright-report/
test-results/
server.log
${{ runner.temp }}/questarr-stack/*.log
retention-days: 14