From f4aad36ea6b2a424d0bc3dd39d356c4590496777 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sun, 3 May 2026 11:35:37 +0200 Subject: [PATCH] chore(ci): stabilize nightly qa pipeline with browser libs and cli fixes --- .gitea/workflows/qa.yml | 74 ++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/.gitea/workflows/qa.yml b/.gitea/workflows/qa.yml index 9c6dc61..bdb90f4 100644 --- a/.gitea/workflows/qa.yml +++ b/.gitea/workflows/qa.yml @@ -60,13 +60,26 @@ jobs: echo "@mintel:registry=https://$REGISTRY" > .npmrc echo "//$REGISTRY/:_authToken=${{ secrets.NPM_TOKEN || secrets.GITEA_PAT || secrets.MINTEL_PRIVATE_TOKEN }}" >> .npmrc - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --no-frozen-lockfile + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }} + - name: 🛠️ Fix @mintel/cli Syntax Error + run: | + CLI_PATH=$(find node_modules -name index.js | grep "@mintel/cli/dist/index.js" | head -n 1) + if [ -n "$CLI_PATH" ] && [ -f "$CLI_PATH" ]; then + echo "Patching CLI at $CLI_PATH" + sed -i '2{/^#!\/usr\/bin\/env node/d;}' "$CLI_PATH" + fi - name: 🌐 HTML Validation env: NEXT_PUBLIC_BASE_URL: 'https://testing.mb-grid-solutions.com' GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || vars.GATEKEEPER_PASSWORD || 'lassmichrein' }} run: pnpm run check:html - - name: 🔍 Install Puppeteer Browser + - name: 🔍 Install Browser Libs + run: | + sudo apt-get update + sudo apt-get install -y libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2 + - name: 🕷️ Install Puppeteer Chrome run: pnpm dlx puppeteer browsers install chrome - name: 🖼️ Asset Scan env: @@ -97,18 +110,17 @@ jobs: echo "@mintel:registry=https://$REGISTRY" > .npmrc echo "//$REGISTRY/:_authToken=${{ secrets.NPM_TOKEN || secrets.GITEA_PAT || secrets.MINTEL_PRIVATE_TOKEN }}" >> .npmrc - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: 🔍 Install Chromium + run: pnpm install --no-frozen-lockfile + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }} + - name: 🌐 Install Chromium run: | - apt-get update && apt-get install -y gnupg wget ca-certificates - CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME) - mkdir -p /etc/apt/keyrings - wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x82BB6851C64F6880" | gpg --dearmor > /etc/apt/keyrings/xtradeb.gpg - echo "deb [signed-by=/etc/apt/keyrings/xtradeb.gpg] http://ppa.launchpad.net/xtradeb/apps/ubuntu $CODENAME main" > /etc/apt/sources.list.d/xtradeb-ppa.list - printf "Package: *\nPin: release o=LP-PPA-xtradeb-apps\nPin-Priority: 1001\n" > /etc/apt/preferences.d/xtradeb - apt-get update || true # Ignore PPA timeout if it happens - apt-get install -y --allow-downgrades chromium-browser || apt-get install -y chromium - ln -sf /usr/bin/chromium-browser /usr/bin/google-chrome || ln -sf /usr/bin/chromium /usr/bin/google-chrome + sudo apt-get update + sudo apt-get install -y software-properties-common gnupg wget ca-certificates + sudo add-apt-repository -y ppa:xtradeb/apps + sudo apt-get update || true + sudo apt-get install -y chromium-browser || sudo apt-get install -y chromium + sudo ln -sf /usr/bin/chromium-browser /usr/bin/google-chrome || sudo ln -sf /usr/bin/chromium /usr/bin/google-chrome - name: ♿ WCAG Scan continue-on-error: true env: @@ -139,10 +151,12 @@ jobs: echo "@mintel:registry=https://$REGISTRY" > .npmrc echo "//$REGISTRY/:_authToken=${{ secrets.NPM_TOKEN || secrets.GITEA_PAT || secrets.MINTEL_PRIVATE_TOKEN }}" >> .npmrc - name: Install dependencies - run: pnpm install --frozen-lockfile + run: pnpm install --no-frozen-lockfile + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }} - name: 📦 Depcheck - continue-on-error: true - run: pnpm dlx depcheck --ignores="*eslint*,*typescript*,*tailwindcss*,*postcss*,*prettier*,*@types/*,*husky*,*lint-staged*,*@next/*,*@lhci/*,*commitlint*,*cspell*,*rimraf*,*@payloadcms/*,*start-server-and-test*,*html-validate*,*critters*,*dotenv*,*turbo*,autoprefixer,pa11y-ci,pino-pretty,framer-motion,lucide-react,next-intl,nodemailer,sharp,vitest" + run: | + pnpm dlx depcheck . --ignores="framer-motion,lucide-react,next-intl,vitest,@testing-library/jest-dom,@testing-library/react,@vitejs/plugin-react,autoprefixer,axios,cheerio,eslint-config-next,happy-dom,html-validate,husky,jsdom,lint-staged,pa11y-ci,pino-pretty,postcss,prettier,puppeteer,tailwindcss,tsx,typescript,@mintel/eslint-config,@mintel/husky-config,@mintel/tsconfig,@tailwindcss/postcss,@types/node,@types/nodemailer,@types/react,@types/react-dom" - name: 🔗 Lychee Link Check uses: lycheeverse/lychee-action@v2 with: @@ -173,18 +187,24 @@ jobs: echo "@mintel:registry=https://$REGISTRY" > .npmrc echo "//$REGISTRY/:_authToken=${{ secrets.NPM_TOKEN || secrets.GITEA_PAT || secrets.MINTEL_PRIVATE_TOKEN }}" >> .npmrc - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: 🔍 Install Chromium + run: pnpm install --no-frozen-lockfile + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }} + - name: 🌐 Install Chromium run: | - apt-get update && apt-get install -y gnupg wget ca-certificates - CODENAME=$(. /etc/os-release && echo $VERSION_CODENAME) - mkdir -p /etc/apt/keyrings - wget -qO- "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x82BB6851C64F6880" | gpg --dearmor > /etc/apt/keyrings/xtradeb.gpg - echo "deb [signed-by=/etc/apt/keyrings/xtradeb.gpg] http://ppa.launchpad.net/xtradeb/apps/ubuntu $CODENAME main" > /etc/apt/sources.list.d/xtradeb-ppa.list - printf "Package: *\nPin: release o=LP-PPA-xtradeb-apps\nPin-Priority: 1001\n" > /etc/apt/preferences.d/xtradeb - apt-get update || true # Ignore PPA timeout if it happens - apt-get install -y --allow-downgrades chromium-browser || apt-get install -y chromium - ln -sf /usr/bin/chromium-browser /usr/bin/google-chrome || ln -sf /usr/bin/chromium /usr/bin/google-chrome + sudo apt-get update + sudo apt-get install -y software-properties-common gnupg wget ca-certificates + sudo add-apt-repository -y ppa:xtradeb/apps + sudo apt-get update || true + sudo apt-get install -y chromium-browser || sudo apt-get install -y chromium + sudo ln -sf /usr/bin/chromium-browser /usr/bin/google-chrome || sudo ln -sf /usr/bin/chromium /usr/bin/google-chrome + - name: 🛠️ Fix @mintel/cli Syntax Error + run: | + CLI_PATH=$(find node_modules -name index.js | grep "@mintel/cli/dist/index.js" | head -n 1) + if [ -n "$CLI_PATH" ] && [ -f "$CLI_PATH" ]; then + echo "Patching CLI at $CLI_PATH" + sed -i '2{/^#!\/usr\/bin\/env node/d;}' "$CLI_PATH" + fi - name: 🎭 LHCI Desktop env: LHCI_URL: 'https://testing.mb-grid-solutions.com'