mirror of
https://github.com/Anarios/return-youtube-dislike.git
synced 2026-09-12 10:22:10 +02:00
Fix Shorts support and add userscript voting
Harden Shorts controls, reaction state, and navigation; share voting logic with the extension; improve ratio-bar rendering; and add comprehensive Jest, Playwright, artifact, and live-browser regression coverage.
This commit is contained in:
@@ -1,25 +1,45 @@
|
||||
name: Test Build Extension
|
||||
name: Test Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- Extensions/combined/**
|
||||
- "Extensions/combined/**"
|
||||
- "Extensions/common/**"
|
||||
- "Extensions/UserScript/**"
|
||||
- "Extensions/e2e/**"
|
||||
- ".github/workflows/build.yaml"
|
||||
- ".babelrc"
|
||||
- ".gitattributes"
|
||||
- ".nvmrc"
|
||||
- "jest.config.js"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- "playwright*.js"
|
||||
- "webpack*.js"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- Extensions/combined/**
|
||||
- "Extensions/combined/**"
|
||||
- "Extensions/common/**"
|
||||
- "Extensions/UserScript/**"
|
||||
- "Extensions/e2e/**"
|
||||
- ".github/workflows/build.yaml"
|
||||
- ".babelrc"
|
||||
- ".gitattributes"
|
||||
- ".nvmrc"
|
||||
- "jest.config.js"
|
||||
- "package.json"
|
||||
- "package-lock.json"
|
||||
- "playwright*.js"
|
||||
- "webpack*.js"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./Extensions/combined
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -27,14 +47,33 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.x'
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run Jest tests
|
||||
run: npm test -- --runInBand
|
||||
|
||||
- name: Build extension
|
||||
run: npm run build
|
||||
|
||||
- name: Build userscript
|
||||
run: npm run build:userscript
|
||||
|
||||
- name: Check generated userscript
|
||||
run: git diff --exit-code -- "Extensions/UserScript/Return Youtube Dislike.user.js"
|
||||
|
||||
- name: Install Chromium
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Run generated-artifact browser tests
|
||||
run: npm run test:e2e:artifacts
|
||||
|
||||
- name: Run userscript browser tests
|
||||
run: npx playwright test --config playwright.userscript.config.js
|
||||
|
||||
- name: Upload Chrome artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@@ -52,3 +91,14 @@ jobs:
|
||||
with:
|
||||
name: ryd-safari
|
||||
path: ./Extensions/combined/dist/safari
|
||||
|
||||
- name: Upload Playwright failure artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: userscript-playwright-failure
|
||||
path: |
|
||||
./test-results
|
||||
./playwright-report
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
|
||||
Reference in New Issue
Block a user