Skip to content

MWPW-145210: Implements changes from QA feedback #392

MWPW-145210: Implements changes from QA feedback

MWPW-145210: Implements changes from QA feedback #392

Workflow file for this run

name: Pull Request
on: [pull_request]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions: write-all
jobs:
check-linting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.1
cache: 'npm'
- name: Install
run: npm ci
- name: Lint
run: npm run lint
check-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.1
cache: 'npm'
- name: Install
run: npm ci
- name: Build
run: npm run build
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.1
- name: Install
run: npm ci
- name: Coverage
run: npm run test:unit
check-coverage-thresholds:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.1
- name: Install
run: npm ci
- name: Coverage
run: npm run test:coverage
deployment:
needs: check-build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Uploads entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
run-e2e-tests:
runs-on: ubuntu-latest
needs: deployment
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.13.1
- name: Install
run: npm ci
- name: E2E
run: npm run test:e2e-prod
run-accessibility-checks:
runs-on: ubuntu-latest
needs: deployment
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.0.0x
uses: actions/setup-node@v3
with:
node-version: 18.0.0
- name: Run pa11y
run: |
npm install -g pa11y@latest
pa11y https://adobecom.github.io/caas/ --timeout=10000 --threshold 20 --debug
run-lighthouse-checks:
runs-on: ubuntu-latest
needs: deployment
steps:
- uses: actions/checkout@master
- name: Lighthouse
uses: foo-software/lighthouse-check-action@master
id: lighthouseCheck
with:
urls: 'https://adobecom.github.io/caas/'
- name: Verify Lighthouse Check results
uses: foo-software/lighthouse-check-status-action@master
with:
lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
minAccessibilityScore: "80"
minBestPracticesScore: "80"
minPerformanceScore: "30"
minProgressiveWebAppScore: "30"
minSeoScore: "70"