mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-02 11:47:23 +02:00
chore(ci): run V1 Build and Migration CLI tests conditionally on CI (#3863)
* chore(ci): run V1 Build and Migration CLI test conditionally on CI * chore(ci): extend lighthouse timeout to 5 minutes * chore(ci): attempt to speed up build size check * chore(ci): use different build command in build size check * chore(ci): use only one locale in build size report workflow * chore(ci): fix quotes, move build-script param down
This commit is contained in:
parent
e90749c6f8
commit
99e3ee796e
5 changed files with 24 additions and 6 deletions
1
.github/workflows/build-size.yml
vendored
1
.github/workflows/build-size.yml
vendored
|
@ -13,6 +13,7 @@ jobs:
|
||||||
- uses: preactjs/compressed-size-action@v2
|
- uses: preactjs/compressed-size-action@v2
|
||||||
with:
|
with:
|
||||||
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
build-script: 'build:v2:en'
|
||||||
pattern: '{website/build/main*js,website/build/styles*css,website/build/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/introduction/index.html}'
|
pattern: '{website/build/main*js,website/build/styles*css,website/build/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/introduction/index.html}'
|
||||||
strip-hash: '\.([^;]\w{7})\.'
|
strip-hash: '\.([^;]\w{7})\.'
|
||||||
minimum-change-threshold: 100
|
minimum-change-threshold: 100
|
||||||
|
|
1
.github/workflows/lighthouseCI.yml
vendored
1
.github/workflows/lighthouseCI.yml
vendored
|
@ -12,6 +12,7 @@ jobs:
|
||||||
id: netlify
|
id: netlify
|
||||||
with:
|
with:
|
||||||
site_name: 'docusaurus-2'
|
site_name: 'docusaurus-2'
|
||||||
|
max_timeout: 300
|
||||||
- name: Audit URLs using Lighthouse
|
- name: Audit URLs using Lighthouse
|
||||||
id: lighthouse_audit
|
id: lighthouse_audit
|
||||||
uses: treosh/lighthouse-ci-action@v3
|
uses: treosh/lighthouse-ci-action@v3
|
||||||
|
|
16
.github/workflows/migration-cli-e2e-test.yml
vendored
16
.github/workflows/migration-cli-e2e-test.yml
vendored
|
@ -1,15 +1,25 @@
|
||||||
name: Migration CLI E2E Test
|
name: Migration CLI E2E Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
migration: ${{ steps.filter.outputs.migration }}
|
||||||
|
steps:
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
migration:
|
||||||
|
- 'packages/docusaurus-migration/**'
|
||||||
build:
|
build:
|
||||||
|
needs: check
|
||||||
|
if: ${{ needs.check.outputs.migration == 'true' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
11
.github/workflows/nodejs-windows.yml
vendored
11
.github/workflows/nodejs-windows.yml
vendored
|
@ -1,9 +1,6 @@
|
||||||
name: Windows Build Test
|
name: Windows Build Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
@ -16,6 +13,13 @@ jobs:
|
||||||
node: ['10']
|
node: ['10']
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- uses: dorny/paths-filter@v2
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
v1:
|
||||||
|
- 'packages/docusaurus-1.x/**'
|
||||||
|
- 'packages/docusaurus-init-1.x/**'
|
||||||
- name: Use Node.js ${{ matrix.node }}
|
- name: Use Node.js ${{ matrix.node }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
|
@ -23,6 +27,7 @@ jobs:
|
||||||
- name: Installation
|
- name: Installation
|
||||||
run: yarn || yarn || yarn # 3 attempts to avoid timeout errors...
|
run: yarn || yarn || yarn # 3 attempts to avoid timeout errors...
|
||||||
- name: Docusaurus 1 Build
|
- name: Docusaurus 1 Build
|
||||||
|
if: steps.filter.outputs.v1 == 'true'
|
||||||
run: yarn build:v1
|
run: yarn build:v1
|
||||||
- name: Docusaurus 2 Build
|
- name: Docusaurus 2 Build
|
||||||
run: yarn build:v2
|
run: yarn build:v2
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"build:v2": "yarn workspace docusaurus-2-website build",
|
"build:v2": "yarn workspace docusaurus-2-website build",
|
||||||
"build:v2:baseUrl": "yarn workspace docusaurus-2-website build:baseUrl",
|
"build:v2:baseUrl": "yarn workspace docusaurus-2-website build:baseUrl",
|
||||||
"build:v2:blogOnly": "yarn workspace docusaurus-2-website build:blogOnly",
|
"build:v2:blogOnly": "yarn workspace docusaurus-2-website build:blogOnly",
|
||||||
|
"build:v2:en": "yarn workspace docusaurus-2-website build --locale en",
|
||||||
"serve:v1": "serve website-1.x/build/docusaurus",
|
"serve:v1": "serve website-1.x/build/docusaurus",
|
||||||
"serve:v2": "yarn workspace docusaurus-2-website serve",
|
"serve:v2": "yarn workspace docusaurus-2-website serve",
|
||||||
"serve:v2:baseUrl": "serve website",
|
"serve:v2:baseUrl": "serve website",
|
||||||
|
|
Loading…
Add table
Reference in a new issue