Skip to content

Commit 99e3ee7

Browse files
authored
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
1 parent e90749c commit 99e3ee7

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

.github/workflows/build-size.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
- uses: preactjs/compressed-size-action@v2
1414
with:
1515
repo-token: '${{ secrets.GITHUB_TOKEN }}'
16+
build-script: 'build:v2:en'
1617
pattern: '{website/build/main*js,website/build/styles*css,website/build/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/introduction/index.html}'
1718
strip-hash: '\.([^;]\w{7})\.'
1819
minimum-change-threshold: 100

.github/workflows/lighthouseCI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
id: netlify
1313
with:
1414
site_name: 'docusaurus-2'
15+
max_timeout: 300
1516
- name: Audit URLs using Lighthouse
1617
id: lighthouse_audit
1718
uses: treosh/lighthouse-ci-action@v3

.github/workflows/migration-cli-e2e-test.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
name: Migration CLI E2E Test
22

33
on:
4-
push:
5-
branches:
6-
- master
74
pull_request:
85
branches:
96
- master
107

118
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
migration: ${{ steps.filter.outputs.migration }}
13+
steps:
14+
- uses: dorny/paths-filter@v2
15+
id: filter
16+
with:
17+
filters: |
18+
migration:
19+
- 'packages/docusaurus-migration/**'
1220
build:
21+
needs: check
22+
if: ${{ needs.check.outputs.migration == 'true' }}
1323
runs-on: ubuntu-latest
1424
strategy:
1525
matrix:

.github/workflows/nodejs-windows.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Windows Build Test
22

33
on:
4-
push:
5-
branches:
6-
- master
74
pull_request:
85
branches:
96
- master
@@ -16,13 +13,21 @@ jobs:
1613
node: ['10']
1714
steps:
1815
- uses: actions/checkout@v2
16+
- uses: dorny/paths-filter@v2
17+
id: filter
18+
with:
19+
filters: |
20+
v1:
21+
- 'packages/docusaurus-1.x/**'
22+
- 'packages/docusaurus-init-1.x/**'
1923
- name: Use Node.js ${{ matrix.node }}
2024
uses: actions/setup-node@v1
2125
with:
2226
node-version: ${{ matrix.node }}
2327
- name: Installation
2428
run: yarn || yarn || yarn # 3 attempts to avoid timeout errors...
2529
- name: Docusaurus 1 Build
30+
if: steps.filter.outputs.v1 == 'true'
2631
run: yarn build:v1
2732
- name: Docusaurus 2 Build
2833
run: yarn build:v2

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"build:v2": "yarn workspace docusaurus-2-website build",
2323
"build:v2:baseUrl": "yarn workspace docusaurus-2-website build:baseUrl",
2424
"build:v2:blogOnly": "yarn workspace docusaurus-2-website build:blogOnly",
25+
"build:v2:en": "yarn workspace docusaurus-2-website build --locale en",
2526
"serve:v1": "serve website-1.x/build/docusaurus",
2627
"serve:v2": "yarn workspace docusaurus-2-website serve",
2728
"serve:v2:baseUrl": "serve website",

0 commit comments

Comments
 (0)