mirror of
https://github.com/videojs/video.js.git
synced 2026-11-20 06:29:27 +01:00
93 lines
2.4 KiB
YAML
93 lines
2.4 KiB
YAML
name: Website Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: website-tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v6.1.0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Restore Vite Task cache
|
|
uses: actions/cache/restore@v6
|
|
with:
|
|
path: node_modules/.vite/task-cache
|
|
key: vite-task-${{ runner.os }}-${{ runner.arch }}-restore-only-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
|
|
restore-keys: |
|
|
vite-task-${{ runner.os }}-${{ runner.arch }}-packages-
|
|
|
|
- name: Run website tests
|
|
run: pnpm exec vp run site#test:ci
|
|
|
|
astro-check:
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v6.1.0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: pnpm
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
|
|
- name: Restore Vite Task cache
|
|
uses: actions/cache/restore@v6
|
|
with:
|
|
path: node_modules/.vite/task-cache
|
|
key: vite-task-${{ runner.os }}-${{ runner.arch }}-restore-only-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
|
|
restore-keys: |
|
|
vite-task-${{ runner.os }}-${{ runner.arch }}-packages-
|
|
|
|
- name: Build packages
|
|
run: pnpm build:packages
|
|
|
|
- name: Generate site content
|
|
run: pnpm exec vp run site#api-docs:generate
|
|
|
|
- name: Check public API stability tags
|
|
run: pnpm -F site check:api-stability
|
|
|
|
- name: Astro check
|
|
run: cd site && pnpm astro check --minimumSeverity warning
|
|
|
|
# No other PR workflow builds the site (only cd.yml on release and Netlify
|
|
# on deploy), so this job owns the build and the checks that need dist/.
|
|
- name: Build site
|
|
run: pnpm build:site
|
|
|
|
- name: Check anchors
|
|
run: pnpm -F site check:anchors
|
|
|
|
- name: Check link analytics tags
|
|
run: pnpm -F site check:link-analytics
|