Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Feat/fragment splitting #200

Feat/fragment splitting

Feat/fragment splitting #200

Workflow file for this run

name: Code checks
on:
push:
branches: [$default-branch]
pull_request:
env:
NODE_VERSION: 20.11
PNPM_VERSION: 8
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
A11Y_HOST: http://localhost:3000 # Nuxt preview default url:port
jobs:
code_checks:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}
- name: Dump version
run: |
echo "Node version: $(node -v) (aiming: ${{ env.NODE_VERSION }})"
echo "Npm version: $(npm --version)"
echo "Pnpm version: $(pnpm --version) (aiming: ${{ env.PNPM_VERSION }})"
echo "Git version: $(git --version)"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: pnpm audit
run: |
pnpm audit > ./audit.log || true
if ! [ "$(cat ./audit.log | wc -l)" = 1 ]; then
echo "::warning::$(cat ./audit.log)"
fi
rm ./audit.log
- name: Format
run: pnpm run format:check:all
- name: Lint
run: pnpm run lint:check:all
- name: Build
run: pnpm run build
pa11y-axe:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Launch server
run: pnpm run preview & pnpx wait-on $A11Y_HOST
- name: Run pa11y
run: |
pnpx pa11y $A11Y_HOST \
--runner axe \
--runner htmlcs \
--ignore 'color-contrast;link-in-text-block;WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail'
tests:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm run test:unit
# https://playwright.dev/docs/ci-intro
# https://playwright.dev/docs/docker
test-playwright:
runs-on: ubuntu-latest
timeout-minutes: 5
container:
image: mcr.microsoft.com/playwright:v1.43.0-jammy
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v3
with:
version: ${{ env.PNPM_VERSION }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps
- name: Build
run: pnpm run build
- name: Launch server
run: pnpm run preview & pnpx wait-on $A11Y_HOST
- name: Run Playwright tests
run: pnpm exec playwright test
env:
HOME: /root
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30