Testing Framwork #17

Merged
an.di merged 83 commits from adilallo/enhancement/TestingFramework2 into main 2025-09-03 18:50:40 +00:00
2 changed files with 45 additions and 37 deletions
Showing only changes of commit 9ecba9a6f1 - Show all commits
+43 -35
View File
@@ -9,6 +9,14 @@ on:
branches: [main, develop]
jobs:
canary:
runs-on: [self-hosted, macos-latest]
steps:
- run: |
uname -a
node -v || true
echo "Runner labels OK ✅"
test:
runs-on: [self-hosted, macos-latest]
strategy:
@@ -110,41 +118,41 @@ jobs:
performance:
runs-on: [self-hosted, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: npm }
- run: npm ci
- name: Install LHCI
run: npm i -D @lhci/cli
# Ensure a Chrome binary is available (works on Linux/macOS runners)
- name: Install Chrome via Puppeteer (portable)
run: |
npx @puppeteer/browsers install chrome@stable -P .cache/puppeteer
echo "CHROME_PATH=$(npx @puppeteer/browsers executable-path chrome@stable -P .cache/puppeteer)" >> $GITHUB_ENV
- name: Build application
run: npm run build
- name: Start application
run: npm run preview &
env: { CI: true }
- name: Wait for application
run: npx wait-on http://localhost:3000
- name: Run Lighthouse CI
run: npx lhci autorun --chrome-path="$CHROME_PATH"
env: { CI: true }
- name: Upload LHCI results
if: always()
uses: actions/upload-artifact@v3
with:
name: lhci-results
path: lhci-results
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: npm }
- run: npm ci
- name: Install LHCI
run: npm i -D @lhci/cli
# Ensure a Chrome binary is available (works on Linux/macOS runners)
- name: Install Chrome via Puppeteer (portable)
run: |
npx @puppeteer/browsers install chrome@stable -P .cache/puppeteer
echo "CHROME_PATH=$(npx @puppeteer/browsers executable-path chrome@stable -P .cache/puppeteer)" >> $GITHUB_ENV
- name: Build application
run: npm run build
- name: Start application
run: npm run preview &
env: { CI: true }
- name: Wait for application
run: npx wait-on http://localhost:3000
- name: Run Lighthouse CI
run: npx lhci autorun --chrome-path="$CHROME_PATH"
env: { CI: true }
- name: Upload LHCI results
if: always()
uses: actions/upload-artifact@v3
with:
name: lhci-results
path: lhci-results
storybook:
runs-on: [self-hosted, macos-latest]
+2 -2
View File
@@ -9,8 +9,8 @@ runner:
fetch_timeout: 5s
fetch_interval: 2s
labels:
- "macos-latest:host"
- "self-hosted:host"
- "self-hosted"
- "macos-latest"
cache:
enabled: true