Skip to content

Commit d7eba63

Browse files
tidusjarJamieConventional Changelog ActionCopilotsnyk-bot
authored
Update the main branch (#5411)
Co-authored-by: Jamie <jamie@tidusjar.com> Co-authored-by: Conventional Changelog Action <conventional.changelog.action@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: snyk-bot <snyk-bot@snyk.io> Co-authored-by: contrib-readme-bot <contrib-readme-action@noreply.com> Co-authored-by: Cloud <cloud@openclaw.ai> Co-authored-by: Esteban Smits <daxmax@gmail.com> Co-authored-by: Joshua Hyde <jrh3k5@pm.me> Co-authored-by: jrh3k5@pm.me <jrh3k5@gmail.com> Co-authored-by: Touchstone64 <touchstone64@gweb.me.uk> Co-authored-by: JGF <44821497+bommerts@users.noreply.github.com> Co-authored-by: Steven Alexson <33904499+salexson@users.noreply.github.com> fix(availability): Make sure we check radarr/sonarr in the availability rules for it's prioritization #5286 Fixes issue #5312 where URLs with #!/details path return 404 Resolves #5319 Fixes #5287 - Issue importing users from Plex Fixes #5288 - Request/count API endpoint: pending field false Fixes failing test in PR #689 - EmbyHelper_GetMediaUrl_AppEmbyMedia_UsesCorrectHashFormat Fixes #5306 - Sonarr items are not showing as available Fix issue #5215: Validate user root paths exist in Sonarr Fixes #5215 Fix issue #5259: Correctly handle 4K vs non-4K duplicate requests Fixes #5259 Fix issue #5311: Allow re-adding items to Plex watchlist Fixes #5311 fix(emby/jellyfin): fix #5338 fix: base url issue #5343 fixed #5379 Fix episode sync and availability checks for multi-episode files (#5389) Fix card actions visibility on touch devices (#5390) fix: issue deletion failing due to foreign key constraint on IssueComments (#5393) fix: restore TV details hero Request button behavior (#5396) fix(plex): migrate legacy numeric provider ids during watchlist import (#5400) fix(plex): skip watchlist target when username collision is detected (#5403) Fix interrupted response when provided an unknown user (#5354) fix(http): enable automatic decompression on OmbiClient (#5410)
1 parent 25127b6 commit d7eba63

458 files changed

Lines changed: 36615 additions & 13102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/automation-tests.yml

Lines changed: 195 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,189 @@ on:
99
- cron: '0 0 * * *'
1010
workflow_dispatch:
1111

12+
# Required secrets (each Cypress Cloud project has its own ID and record key):
13+
# CYPRESS_PROJECT_ID_MYSQL - Cypress Cloud project ID for MySQL runs
14+
# CYPRESS_RECORD_KEY_MYSQL - Cypress Cloud record key for MySQL runs
15+
# CYPRESS_PROJECT_ID_POSTGRES - Cypress Cloud project ID for PostgreSQL runs
16+
# CYPRESS_RECORD_KEY_POSTGRES - Cypress Cloud record key for PostgreSQL runs
17+
# CYPRESS_PROJECT_ID_SQLITE - Cypress Cloud project ID for SQLite runs
18+
# CYPRESS_RECORD_KEY_SQLITE - Cypress Cloud record key for SQLite runs
19+
1220
jobs:
13-
automation-tests:
21+
# ──────────────────────────────────────────────────────────────
22+
# MySQL (full suite) and PostgreSQL (smoke) — need Docker services
23+
# ──────────────────────────────────────────────────────────────
24+
db-tests:
25+
runs-on: ubuntu-latest
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
include:
31+
- db: mysql
32+
db_type: MySQL
33+
connection_string: "Server=127.0.0.1;Port=3306;Database=ombi;User=ombi;Password=ombi;"
34+
cypress_project_id_secret: CYPRESS_PROJECT_ID_MYSQL
35+
cypress_record_key_secret: CYPRESS_RECORD_KEY_MYSQL
36+
cypress_spec: ""
37+
test_scope: full
38+
- db: postgres
39+
db_type: Postgres
40+
connection_string: "Host=127.0.0.1;Port=5432;Database=ombi;Username=ombi;Password=ombi;"
41+
cypress_project_id_secret: CYPRESS_PROJECT_ID_POSTGRES
42+
cypress_record_key_secret: CYPRESS_RECORD_KEY_POSTGRES
43+
cypress_spec: "cypress/features/01-wizard/wizard.feature,cypress/features/login/login.feature,cypress/tests/login/login.spec.ts"
44+
test_scope: smoke
45+
46+
services:
47+
mysql:
48+
image: mysql:8
49+
ports:
50+
- 3306:3306
51+
env:
52+
MYSQL_ROOT_PASSWORD: root
53+
MYSQL_DATABASE: ombi
54+
MYSQL_USER: ombi
55+
MYSQL_PASSWORD: ombi
56+
options: >-
57+
--health-cmd="mysqladmin ping -h 127.0.0.1"
58+
--health-interval=10s
59+
--health-timeout=5s
60+
--health-retries=5
61+
postgres:
62+
image: postgres:15
63+
ports:
64+
- 5432:5432
65+
env:
66+
POSTGRES_DB: ombi
67+
POSTGRES_USER: ombi
68+
POSTGRES_PASSWORD: ombi
69+
options: >-
70+
--health-cmd="pg_isready -U ombi"
71+
--health-interval=10s
72+
--health-timeout=5s
73+
--health-retries=5
74+
75+
name: "E2E Tests (${{ matrix.db }} - ${{ matrix.test_scope }})"
76+
77+
steps:
78+
- uses: actions/checkout@v4
79+
80+
- name: Setup .NET
81+
uses: actions/setup-dotnet@v4
82+
with:
83+
dotnet-version: 8.0.x
84+
85+
- uses: actions/setup-node@v4
86+
with:
87+
node-version: '20'
88+
89+
- uses: actions/cache@v4
90+
with:
91+
path: |
92+
'**/node_modules'
93+
'/home/runner/.cache/Cypress'
94+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
95+
96+
- name: Install Frontend Deps
97+
run: yarn --cwd ./src/Ombi/ClientApp install
98+
99+
- name: Install Test Dependencies
100+
run: yarn --cwd ./tests install
101+
102+
- name: Start Frontend
103+
run: |
104+
nohup yarn --cwd ./src/Ombi/ClientApp start &
105+
106+
- name: Restore .NET Dependencies
107+
run: dotnet restore ./src/Ombi/Ombi.csproj
108+
109+
- name: Build .NET Project
110+
run: dotnet build ./src/Ombi/Ombi.csproj --no-restore
111+
112+
- name: Write database.json
113+
run: |
114+
cat > ./src/Ombi/database.json <<EOF
115+
{
116+
"OmbiDatabase": {
117+
"Type": "${{ matrix.db_type }}",
118+
"ConnectionString": "${{ matrix.connection_string }}"
119+
},
120+
"SettingsDatabase": {
121+
"Type": "${{ matrix.db_type }}",
122+
"ConnectionString": "${{ matrix.connection_string }}"
123+
},
124+
"ExternalDatabase": {
125+
"Type": "${{ matrix.db_type }}",
126+
"ConnectionString": "${{ matrix.connection_string }}"
127+
}
128+
}
129+
EOF
130+
131+
- name: Start Backend
132+
run: |
133+
nohup dotnet run --project ./src/Ombi -- --host http://*:3577 &
134+
135+
- name: Run Wiremock
136+
run: nohup docker run --rm -p 32400:8080 --name wiremock wiremock/wiremock:2.35.0 &
137+
138+
- name: Sleep for server to start
139+
run: sleep 20
14140

141+
- name: Cypress Tests (full suite)
142+
if: matrix.cypress_spec == ''
143+
uses: cypress-io/github-action@v4
144+
with:
145+
record: true
146+
browser: chrome
147+
headless: true
148+
working-directory: tests
149+
wait-on: http://localhost:3577/
150+
wait-on-timeout: 600
151+
env:
152+
CYPRESS_RECORD_KEY: ${{ secrets[matrix.cypress_record_key_secret] }}
153+
CYPRESS_PROJECT_ID: ${{ secrets[matrix.cypress_project_id_secret] }}
154+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155+
156+
- name: Cypress Tests (smoke)
157+
if: matrix.cypress_spec != ''
158+
uses: cypress-io/github-action@v4
159+
with:
160+
record: true
161+
browser: chrome
162+
headless: true
163+
working-directory: tests
164+
spec: ${{ matrix.cypress_spec }}
165+
wait-on: http://localhost:3577/
166+
wait-on-timeout: 600
167+
env:
168+
CYPRESS_RECORD_KEY: ${{ secrets[matrix.cypress_record_key_secret] }}
169+
CYPRESS_PROJECT_ID: ${{ secrets[matrix.cypress_project_id_secret] }}
170+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
171+
172+
- name: Stop Services
173+
if: always()
174+
run: |
175+
pkill -f "dotnet.*Ombi" || true
176+
docker container kill wiremock || true
177+
178+
# ──────────────────────────────────────────────────────────────
179+
# SQLite (smoke) — no Docker services needed
180+
# ──────────────────────────────────────────────────────────────
181+
sqlite-tests:
15182
runs-on: ubuntu-latest
16183

184+
name: "E2E Tests (sqlite - smoke)"
185+
17186
steps:
18-
- uses: actions/checkout@v2
187+
- uses: actions/checkout@v4
188+
19189
- name: Setup .NET
20-
uses: actions/setup-dotnet@v1
190+
uses: actions/setup-dotnet@v4
21191
with:
22192
dotnet-version: 8.0.x
23-
- uses: actions/setup-node@v2
193+
194+
- uses: actions/setup-node@v4
24195
with:
25196
node-version: '20'
26197

@@ -57,22 +228,39 @@ jobs:
57228
- name: Sleep for server to start
58229
run: sleep 20
59230

60-
- name: Cypress Tests
231+
- name: Cypress Tests (smoke)
61232
uses: cypress-io/github-action@v4
62233
with:
63234
record: true
64235
browser: chrome
65236
headless: true
66237
working-directory: tests
238+
spec: "cypress/features/01-wizard/wizard.feature,cypress/features/login/login.feature,cypress/tests/login/login.spec.ts"
67239
wait-on: http://localhost:3577/
68-
# 10 minutes
69240
wait-on-timeout: 600
241+
spec: cypress/features/01-wizard/wizard.feature
70242
env:
71243
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
72244
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73245

246+
- name: Cypress Tests - All other tests
247+
uses: cypress-io/github-action@v4
248+
with:
249+
record: true
250+
browser: chrome
251+
headless: true
252+
working-directory: tests
253+
wait-on: http://localhost:3577/
254+
wait-on-timeout: 600
255+
spec: >-
256+
cypress/tests/**/*
257+
env:
258+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY_SQLITE }}
259+
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID_SQLITE }}
260+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
261+
74262
- name: Stop Services
75263
if: always()
76264
run: |
77265
pkill -f "dotnet.*Ombi" || true
78-
docker container kill wiremock || true
266+
docker container kill wiremock || true

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Build UI
2727
run: yarn --cwd ./src/Ombi/ClientApp run build
2828

29+
- name: Run UI Tests
30+
run: yarn --cwd ./src/Ombi/ClientApp run test
31+
2932
- name: Publish UI Artifacts
3033
uses: actions/upload-artifact@v4
3134
with:
@@ -198,6 +201,51 @@ jobs:
198201
artifacts/**/*.tar.gz
199202
artifacts/**/*.zip
200203
204+
docker:
205+
needs: [ unit-test, versioning ]
206+
runs-on: ubuntu-latest
207+
permissions:
208+
contents: read
209+
packages: write
210+
steps:
211+
- uses: actions/checkout@v4
212+
213+
- name: Docker Meta
214+
id: meta
215+
uses: docker/metadata-action@v5
216+
with:
217+
images: |
218+
ghcr.io/${{ github.repository }}
219+
tags: |
220+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
221+
type=raw,value=${{ needs.versioning.outputs.version }},enable=${{ needs.versioning.outputs.version != '' }}
222+
type=raw,value=develop,enable=${{ github.ref == 'refs/heads/develop' }}
223+
224+
- name: Set up QEMU
225+
uses: docker/setup-qemu-action@v3
226+
227+
- name: Set up Docker Buildx
228+
uses: docker/setup-buildx-action@v3
229+
230+
- name: Login to GitHub Container Registry
231+
uses: docker/login-action@v3
232+
with:
233+
registry: ghcr.io
234+
username: ${{ github.actor }}
235+
password: ${{ secrets.GITHUB_TOKEN }}
236+
237+
- name: Build and Push Docker Image
238+
uses: docker/build-push-action@v5
239+
with:
240+
context: ./src
241+
file: ./src/dockerfile
242+
push: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}
243+
platforms: linux/amd64,linux/arm64
244+
tags: ${{ steps.meta.outputs.tags }}
245+
labels: ${{ steps.meta.outputs.labels }}
246+
cache-from: type=gha
247+
cache-to: type=gha,mode=max
248+
201249
update-apt:
202250
needs: [ release, versioning ]
203251
runs-on: ubuntu-latest

.github/workflows/chromatic.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/contributor-recognition.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Contributor Recognition
22

3+
# pull_request_target runs in the base repo context so the token has
4+
# write access even when the PR originates from a fork.
5+
# Safe here because we never checkout or execute code from the fork.
36
on:
4-
pull_request:
7+
pull_request_target:
58
types: [closed]
69
workflow_dispatch:
710

.github/workflows/first-time-contributor.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: First Time Contributor Welcome
22

3+
# pull_request_target runs in the base repo context so the token has
4+
# write access even when the PR originates from a fork.
5+
# Safe here because we never checkout or execute code from the fork.
36
on:
4-
pull_request:
7+
pull_request_target:
58
types: [opened]
69
branches: [develop]
710

0 commit comments

Comments
 (0)