mirror of
https://github.com/Anarios/return-youtube-dislike.git
synced 2026-10-27 23:31:06 +01:00
5d01972c3c
Refresh workflow CA trust and add an opt-in filtered Node launcher. Preserve inherited TLS settings in website commands and set the native language for Linux locale tests. Validated with hosted lint, 2351 Jest tests, 112 extension browser tests, 151 userscript browser tests, generated-artifact checks, and successful browser artifact builds.
140 lines
3.8 KiB
YAML
140 lines
3.8 KiB
YAML
name: Test Builds
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "Extensions/combined/**"
|
|
- "Extensions/common/**"
|
|
- "Extensions/UserScript/**"
|
|
- "Extensions/e2e/**"
|
|
- "Website/_locales/**"
|
|
- "Website/utils/locale*"
|
|
- "Website/nuxt.config.js"
|
|
- "Website/layouts/default.vue"
|
|
- ".github/workflows/build.yaml"
|
|
- ".babelrc"
|
|
- ".gitattributes"
|
|
- ".nvmrc"
|
|
- "extension-build-receipt*.js"
|
|
- "userscript-build-receipt*.js"
|
|
- "jest.config.js"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- "scripts/check-locales*"
|
|
- "scripts/with-trusted-node*"
|
|
- "playwright*.js"
|
|
- "webpack*.js"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "Extensions/combined/**"
|
|
- "Extensions/common/**"
|
|
- "Extensions/UserScript/**"
|
|
- "Extensions/e2e/**"
|
|
- "Website/_locales/**"
|
|
- "Website/utils/locale*"
|
|
- "Website/nuxt.config.js"
|
|
- "Website/layouts/default.vue"
|
|
- ".github/workflows/build.yaml"
|
|
- ".babelrc"
|
|
- ".gitattributes"
|
|
- ".nvmrc"
|
|
- "extension-build-receipt*.js"
|
|
- "userscript-build-receipt*.js"
|
|
- "jest.config.js"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
- "scripts/check-locales*"
|
|
- "scripts/with-trusted-node*"
|
|
- "playwright*.js"
|
|
- "webpack*.js"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
NODE_OPTIONS: --use-openssl-ca
|
|
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
|
|
SSL_CERT_DIR: /etc/ssl/certs
|
|
|
|
steps:
|
|
- name: Update trusted certificate authorities
|
|
run: |
|
|
sudo apt-get update -o APT::Update::Error-Mode=any
|
|
sudo apt-get install --yes --no-install-recommends --only-upgrade ca-certificates
|
|
dpkg --compare-versions "$(dpkg-query -W -f='${Version}' ca-certificates)" ge 20260816ubuntu0.24.04.1
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: .nvmrc
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run Jest tests
|
|
run: npm test -- --runInBand
|
|
|
|
- name: Check locale completeness
|
|
run: npm run check:locales
|
|
|
|
- name: Build extension
|
|
run: npm run build
|
|
|
|
- name: Check generated extension artifact
|
|
run: npm run check:extension-artifact
|
|
|
|
- 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 extension browser tests
|
|
run: npm run test:e2e:extension:run
|
|
|
|
- name: Run userscript browser tests
|
|
run: npm run test:e2e:userscript:run
|
|
|
|
- name: Upload Chrome artifact
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: ryd-chrome
|
|
path: ./Extensions/combined/dist/chrome
|
|
|
|
- name: Upload Firefox artifact
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: ryd-firefox
|
|
path: ./Extensions/combined/dist/firefox
|
|
|
|
- name: Upload Safari artifact
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: ryd-safari
|
|
path: ./Extensions/combined/dist/safari
|
|
|
|
- name: Upload Playwright failure artifacts
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: playwright-browser-failures
|
|
path: |
|
|
./test-results
|
|
./playwright-report
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|