chore: Remove unnecessary dev dependencies #540
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
# Prevent duplicates runs for PRs from non-forks. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
defaults: | |
run: | |
# TODO: Our package.json scripts currently assume that they are run | |
# from bash, even on Windows. | |
# We should probably make them OS-agnostic instead. | |
shell: bash | |
continue-on-error: ${{ matrix.docusaurus-version == 'canary' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node-version: [18.x, 20.x, 22.x] | |
docusaurus-version: | |
- "v2.4.3" | |
- "v2.4.1" | |
- "v2.4.0" | |
- "v2.3.1" | |
- "v2.2.0" | |
- "v2.1.0" | |
- "v2.0.1" | |
- "canary" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run lint | |
- run: npm install --workspaces --save-dev '@docusaurus/core@${{ matrix.docusaurus-version }}' '@docusaurus/preset-classic@${{ matrix.docusaurus-version }}' '@docusaurus/module-type-aliases@${{ matrix.docusaurus-version }}' '@docusaurus/plugin-content-blog@${{ matrix.docusaurus-version }}' '@docusaurus/plugin-content-docs@${{ matrix.docusaurus-version }}' '@docusaurus/plugin-content-pages@${{ matrix.docusaurus-version }}' '@docusaurus/theme-common@${{ matrix.docusaurus-version }}' '@docusaurus/theme-classic@${{ matrix.docusaurus-version }}' '@docusaurus/types@${{ matrix.docusaurus-version }}' | |
- run: npm dedupe | |
- run: npm run build | |
- run: npm run test | |
# Install OS dependencies | |
# Run `apt update` beforehand to avoid 404 Not Found errors during apt install. | |
- run: sudo apt update | |
if: runner.os == 'Linux' | |
- run: npx playwright install-deps | |
# Install Browsers | |
- run: npx playwright install | |
- run: npm run test:e2e -- -- --browser=all --forbid-only | |
# TODO: Cannot run browser tests for these for now. | |
- run: npm run build -w example-docs -- --config docusaurus.config.noTrailingSlash.js | |
- run: npm run build -w example-docs -- --config docusaurus.config.subDirectory.js | |
- run: npm run build -w example-docs -- --config docusaurus.config.noTrailingSlashSubdirectory.js |