mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-09-12 09:58:20 +02:00
3657de9b2c
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.
105 lines
2.5 KiB
YAML
105 lines
2.5 KiB
YAML
name: Test Builds
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "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/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
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
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:
|
|
name: ryd-chrome
|
|
path: ./Extensions/combined/dist/chrome
|
|
|
|
- name: Upload Firefox artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ryd-firefox
|
|
path: ./Extensions/combined/dist/firefox
|
|
|
|
- name: Upload Safari artifact
|
|
uses: actions/upload-artifact@v4
|
|
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
|