Some checks failed
Nightly QA (Inlined) / 🏗️ Prepare & Install (push) Successful in 57s
CI - Quality Assurance / 🧪 QA (pull_request) Successful in 3m44s
Nightly QA (Inlined) / 🔍 Static Analysis (push) Failing after 3m36s
Nightly QA (Inlined) / 🧪 Maintenance & Links (push) Successful in 1m15s
Nightly QA (Inlined) / ♿ Accessibility (push) Failing after 2m27s
Nightly QA (Inlined) / 🔔 Notify (push) Has been cancelled
Nightly QA (Inlined) / 🎭 Lighthouse (push) Has been cancelled
270 lines
11 KiB
YAML
270 lines
11 KiB
YAML
name: Nightly QA (Inlined)
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * *' # Every night at 2:00 AM
|
|
push:
|
|
branches:
|
|
- main
|
|
- fix/nightly-qa-stabilization
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
prepare:
|
|
name: 🏗️ Prepare & Install
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 10
|
|
- name: 🔐 Registry Auth
|
|
run: |
|
|
REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}"
|
|
echo "@mintel:registry=https://$REGISTRY" > .npmrc
|
|
echo "//$REGISTRY/:_authToken=${{ secrets.NPM_TOKEN || secrets.GITEA_PAT || secrets.MINTEL_PRIVATE_TOKEN }}" >> .npmrc
|
|
- name: Install dependencies
|
|
run: |
|
|
rm -rf .next .turbo node_modules || true
|
|
pnpm install --frozen-lockfile --reporter=append-only
|
|
|
|
static:
|
|
name: 🔍 Static Analysis
|
|
needs: prepare
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 10
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: 🔐 Registry Auth
|
|
run: |
|
|
REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}"
|
|
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 --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 Chromium
|
|
run: |
|
|
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: 🕷️ Install Puppeteer Chrome
|
|
run: pnpm dlx puppeteer browsers install chrome || true # Fallback if apt version is used
|
|
- name: 🖼️ Asset Scan
|
|
env:
|
|
NEXT_PUBLIC_BASE_URL: 'https://testing.mb-grid-solutions.com'
|
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || vars.GATEKEEPER_PASSWORD || 'lassmichrein' }}
|
|
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium-browser
|
|
CHROME_PATH: /usr/bin/chromium-browser
|
|
run: pnpm run check:assets
|
|
|
|
accessibility:
|
|
name: ♿ Accessibility
|
|
needs: prepare
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 10
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: 🔐 Registry Auth
|
|
run: |
|
|
REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}"
|
|
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 --no-frozen-lockfile
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }}
|
|
- name: 🌐 Install Chromium
|
|
run: |
|
|
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:
|
|
NEXT_PUBLIC_BASE_URL: 'https://testing.mb-grid-solutions.com'
|
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || vars.GATEKEEPER_PASSWORD || 'lassmichrein' }}
|
|
CHROME_PATH: /usr/bin/chromium-browser
|
|
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium-browser
|
|
run: pnpm run check:wcag
|
|
|
|
analysis:
|
|
name: 🧪 Maintenance & Links
|
|
needs: prepare
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 10
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: 🔐 Registry Auth
|
|
run: |
|
|
REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}"
|
|
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 --no-frozen-lockfile
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }}
|
|
- name: 📦 Depcheck
|
|
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,@payloadcms/ui,@commitlint/*"
|
|
- name: 🔗 Lychee Link Check
|
|
uses: lycheeverse/lychee-action@v2
|
|
with:
|
|
args: --accept 200,204,429 --timeout 15 app/ public/
|
|
fail: true
|
|
failIfEmpty: false
|
|
|
|
performance:
|
|
name: 🎭 Lighthouse
|
|
needs: prepare
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v3
|
|
with:
|
|
version: 10
|
|
- name: 🔐 Registry Auth
|
|
run: |
|
|
REGISTRY="${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}"
|
|
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 --no-frozen-lockfile
|
|
env:
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.MINTEL_PRIVATE_TOKEN }}
|
|
- name: 🌐 Install Chromium
|
|
run: |
|
|
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'
|
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || vars.GATEKEEPER_PASSWORD || 'lassmichrein' }}
|
|
CHROME_PATH: /usr/bin/chromium-browser
|
|
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium-browser
|
|
run: pnpm exec mintel pagespeed test -- --collect.settings.preset=desktop
|
|
- name: 📱 LHCI Mobile
|
|
env:
|
|
LHCI_URL: 'https://testing.mb-grid-solutions.com'
|
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD || vars.GATEKEEPER_PASSWORD || 'lassmichrein' }}
|
|
CHROME_PATH: /usr/bin/chromium-browser
|
|
PUPPETEER_EXECUTABLE_PATH: /usr/bin/chromium-browser
|
|
run: pnpm exec mintel pagespeed test -- --collect.settings.preset=mobile
|
|
|
|
notifications:
|
|
name: 🔔 Notify
|
|
needs: [prepare, static, accessibility, analysis, performance]
|
|
if: always()
|
|
runs-on: docker
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: 🔔 Gotify
|
|
shell: bash
|
|
run: |
|
|
PREPARE="${{ needs.prepare.result }}"
|
|
STATIC="${{ needs.static.result }}"
|
|
A11Y="${{ needs.accessibility.result }}"
|
|
ANALYSIS="${{ needs.analysis.result }}"
|
|
PERF="${{ needs.performance.result }}"
|
|
|
|
PROJECT="mb-grid-solutions"
|
|
URL="https://testing.mb-grid-solutions.com"
|
|
|
|
if [[ "$PREPARE" != "success" || "$STATIC" != "success" || "$PERF" != "success" ]]; then
|
|
PRIORITY=8
|
|
EMOJI="🚨"
|
|
STATUS_LINE="Nightly QA Failed! Action required."
|
|
else
|
|
PRIORITY=2
|
|
EMOJI="✅"
|
|
STATUS_LINE="Nightly QA Passed."
|
|
fi
|
|
|
|
TITLE="$EMOJI $PROJECT Nightly QA"
|
|
MESSAGE="$STATUS_LINE
|
|
Prepare: $PREPARE | Static: $STATIC | A11y: $A11Y
|
|
Analysis: $ANALYSIS | Perf: $PERF
|
|
$URL"
|
|
|
|
curl -s -k -X POST "${{ secrets.GOTIFY_URL }}/message?token=${{ secrets.GOTIFY_TOKEN }}" \
|
|
-F "title=$TITLE" \
|
|
-F "message=$MESSAGE" \
|
|
-F "priority=$PRIORITY" || true
|