From 8fba542d26c53c3cb7745baeec1cc584dfd50bd5 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Mon, 8 Nov 2021 22:04:39 +0800 Subject: [PATCH] chore(workflow): merge jobs into one workflow & give each job a name (#5907) --- .github/workflows/build-blog-only.yml | 1 + .../{build-size-report.yml => build-perf.yml} | 29 +++++++++++++++-- .github/workflows/build-time-perf.yml | 31 ------------------- .github/workflows/canary-release.yml | 1 + .github/workflows/lighthouse-report.yml | 3 +- .github/workflows/lint.yml | 1 + .github/workflows/tests-e2e.yml | 2 ++ .github/workflows/tests-windows.yml | 30 ------------------ .github/workflows/tests.yml | 26 ++++++++++++++++ 9 files changed, 60 insertions(+), 64 deletions(-) rename .github/workflows/{build-size-report.yml => build-perf.yml} (60%) delete mode 100644 .github/workflows/build-time-perf.yml delete mode 100644 .github/workflows/tests-windows.yml diff --git a/.github/workflows/build-blog-only.yml b/.github/workflows/build-blog-only.yml index da0ed5d2e7..766f097dba 100644 --- a/.github/workflows/build-blog-only.yml +++ b/.github/workflows/build-blog-only.yml @@ -9,6 +9,7 @@ on: jobs: build: + name: Build Blog-only timeout-minutes: 30 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/build-size-report.yml b/.github/workflows/build-perf.yml similarity index 60% rename from .github/workflows/build-size-report.yml rename to .github/workflows/build-perf.yml index 50bbf710c9..e1edd0f4ba 100644 --- a/.github/workflows/build-size-report.yml +++ b/.github/workflows/build-perf.yml @@ -1,4 +1,4 @@ -name: Build Size Report +name: Build Performance on: # Note! you can't safely use "pull_request_target" here @@ -9,9 +9,12 @@ on: pull_request: branches: - main + paths-ignore: + - website/docs/** jobs: - build: + build-size: + name: Build Size Report timeout-minutes: 30 runs-on: ubuntu-latest steps: @@ -27,3 +30,25 @@ jobs: strip-hash: '\.([^;]\w{7})\.' minimum-change-threshold: 30 compression: none + build-time: + name: Build Time Perf + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + cache: yarn + - name: Installation + run: yarn + + # Ensure build with a cold cache does not increase too much + - name: Build (cold cache) + run: yarn workspace website build --locale en + timeout-minutes: 8 + + # Ensure build with a warm cache does not increase too much + - name: Build (warm cache) + run: yarn workspace website build --locale en + timeout-minutes: 2 + # TODO post a Github comment with build with perf warnings? diff --git a/.github/workflows/build-time-perf.yml b/.github/workflows/build-time-perf.yml deleted file mode 100644 index b5e0e08ef9..0000000000 --- a/.github/workflows/build-time-perf.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Build Time Perf - -on: - pull_request: - branches: - - main - paths-ignore: - - website/docs/** - -jobs: - build: - timeout-minutes: 30 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - cache: yarn - - name: Installation - run: yarn - - # Ensure build with a cold cache does not increase too much - - name: Build (cold cache) - run: yarn workspace website build --locale en - timeout-minutes: 8 - - # Ensure build with a warm cache does not increase too much - - name: Build (warm cache) - run: yarn workspace website build --locale en - timeout-minutes: 2 - # TODO post a Github comment with build with perf warnings? diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index 6572faadb8..9fabecd023 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -9,6 +9,7 @@ on: jobs: publish-canary: + name: Publish Canary runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 71d2c041ec..e1ee61bc04 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -6,7 +6,8 @@ on: - main jobs: - build: + lighthouse-report: + name: Lighthouse Report runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8da4c7ebd4..72fb77da75 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,6 +7,7 @@ on: jobs: lint: + name: Lint timeout-minutes: 30 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 27d967a6f4..0666a2e64a 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -10,6 +10,7 @@ on: jobs: yarn-v1: + name: E2E Test with Yarn v1 timeout-minutes: 30 runs-on: ubuntu-latest strategy: @@ -42,6 +43,7 @@ jobs: CI: true yarn-berry: + name: E2E Test with Yarn Berry timeout-minutes: 30 runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/tests-windows.yml b/.github/workflows/tests-windows.yml deleted file mode 100644 index 871f67a9e6..0000000000 --- a/.github/workflows/tests-windows.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Windows Tests - -on: - pull_request: - branches: - - main - -jobs: - build: - timeout-minutes: 30 - runs-on: windows-latest - strategy: - matrix: - node: ['14', '16', '17'] - steps: - - name: Support longpaths - run: git config --system core.longpaths true - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: Installation - run: yarn || yarn || yarn # 3 attempts to avoid timeout errors... - - name: Docusaurus Jest Tests - run: yarn test - - name: Docusaurus Build - run: yarn build:website --locale en - env: - CI: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 35705996cf..e0c50ebd5d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,9 +4,12 @@ on: pull_request: branches: - main + paths-ignore: + - website/** jobs: test: + name: Tests timeout-minutes: 30 runs-on: ubuntu-latest strategy: @@ -25,3 +28,26 @@ jobs: run: yarn test - name: TypeCheck website run: yarn workspace website tsc + windows-test: + name: Windows Tests + timeout-minutes: 30 + runs-on: windows-latest + strategy: + matrix: + node: ['14', '16', '17'] + steps: + - name: Support longpaths + run: git config --system core.longpaths true + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - name: Installation + run: yarn || yarn || yarn # 3 attempts to avoid timeout errors... + - name: Docusaurus Jest Tests + run: yarn test + - name: Docusaurus Build + run: yarn build:website --locale en + env: + CI: true