Skip to content

fix: fall back to unpkg for oversized packages #13712

fix: fall back to unpkg for oversized packages

fix: fall back to unpkg for oversized packages #13712

Workflow file for this run

name: ci
on:
pull_request:
branches:
- main
- release
push:
branches:
- main
merge_group:
branches:
- main
# cancel in-progress runs on new commits to same PR (github.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: πŸ”  Lint project
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
sfw: true
# root only, no scripts
run-install: |
- args: ['--filter', '.', '--ignore-scripts']
- name: πŸ”  Lint project
run: vp run lint
types:
name: πŸ’ͺ Type check
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
cache: true
sfw: true
- name: πŸ’ͺ Type check
run: vp run test:types
unit:
name: πŸ§ͺ Unit tests
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
cache: true
sfw: true
- name: πŸ§ͺ Unit tests
run: vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
- name: β¬†οΈŽ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
files: test-report.junit.xml
flags: unit
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: β¬†οΈŽ Upload coverage reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
files: coverage/clover.xml
flags: unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test:
name: πŸ§ͺ Component tests
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
cache: true
sfw: true
- name: 🌐 Install browser
run: vp exec playwright install chromium-headless-shell
- name: πŸ§ͺ Component tests
run: vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
- name: β¬†οΈŽ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
files: test-report.junit.xml
flags: component
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: β¬†οΈŽ Upload coverage reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
files: coverage/clover.xml
flags: component
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
browser:
name: πŸ–₯️ Browser tests
runs-on: ubuntu-24.04-arm
container:
image: mcr.microsoft.com/playwright:v1.62.1-noble@sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: πŸ‘‘ Fix Git ownership
run: git config --global --add safe.directory /__w/npmx.dev/npmx.dev
# Required to build better-sqlite3 for docs presumably because of the
# use of the playwright container. We should remove this if we stop having
# to build better-sqlite3 and the prebuilt binary starts working.
- name: 🚧 Install build tools
run: apt-get update && apt-get install --yes build-essential
shell: bash
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
cache: true
sfw: true
- name: πŸ—οΈ Build project
run: vp run build:test
env:
VALIDATE_HTML: true
- name: πŸ–₯️ Test project (browser)
run: vp run test:browser:prebuilt
- name: β¬†οΈŽ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
disable_search: true
files: test-report.junit.xml
flags: browser
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# TODO(serhalp): Upload browser *coverage* report once we've instrumented the prebuilt bundle
a11y:
name: β™Ώ Accessibility audit
runs-on: ubuntu-latest # See https://github.com/GoogleChrome/lighthouse/discussions/16834
strategy:
matrix:
mode: [dark, light]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
cache: true
sfw: true
- name: πŸ—οΈ Build project
run: vp run build:test
- name: β™Ώ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
run: vp run test:a11y:prebuilt
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
knip:
name: 🧹 Unused code check
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
cache: true
sfw: true
- name: 🧹 Check for unused code
run: vp run knip
i18n:
name: 🌐 i18n validation
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0
with:
node-version: lts/*
sfw: true
# root only, no scripts
run-install: |
- args: ['--filter', '.', '--ignore-scripts']
- name: 🌐 Check for missing or dynamic i18n keys
run: vp run i18n:report
- name: 🌐 Check i18n schema is up to date
run: |
vp run i18n:schema
git diff --exit-code i18n/schema.json