Skip to content

Daily Tests & Auto-Fix #89

Daily Tests & Auto-Fix

Daily Tests & Auto-Fix #89

Workflow file for this run

name: Daily Tests & Auto-Fix
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
permissions:
contents: write
pull-requests: write
jobs:
unit-tests:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run unit tests
id: test
run: npm test
continue-on-error: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-results
path: test-results.json
if-no-files-found: ignore
e2e-tests:
runs-on: ubuntu-latest
name: E2E UI Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Build application
run: npm run build
- name: Run E2E tests
id: e2e
run: npm run test:e2e
continue-on-error: true
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30
chromatic-visual-tests:
runs-on: ubuntu-latest
name: Chromatic Visual Tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build Storybook
run: npm run build-storybook
- name: Run Chromatic
uses: chromaui/action@latest
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: storybook-static
exitOnceUploaded: true
onlyChanged: true
autoAcceptChanges: main