-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(v2): fail CI if build takes too much time (#4516)
* remove the .cache folder so that it removes both webpack cache-loader-v4/persistent-cache-v5 + webpack terser cache * Add GH action to track build time perf with a timeout * Add GH action to track build time perf with a timeout
- Loading branch information
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
- 'packages/docusaurus/**' | ||
|
||
jobs: | ||
lint: | ||
build: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: V2 Build Time Perf | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- 'website/docs/**' | ||
- 'website-1.x/**' | ||
- 'packages/docusaurus-1.x/**' | ||
- 'packages/docusaurus-init-1.x/**' | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
- name: Installation | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
install-command: yarn | ||
|
||
# Ensure build with a cold cache does not increase too much | ||
- name: Build (cold cache) | ||
run: yarn workspace docusaurus-2-website build | ||
timeout-minutes: 10 | ||
|
||
# Ensure build with a warm cache does not increase too much | ||
- name: Build (warm cache) | ||
run: yarn workspace docusaurus-2-website build | ||
timeout-minutes: 10 | ||
|
||
# TODO post a Github comment with build with perf warnings? |
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