chore(workflow): merge jobs into one workflow & give each job a name (#5907)

This commit is contained in:
Joshua Chen 2021-11-08 22:04:39 +08:00 committed by GitHub
parent f12c390a17
commit 8fba542d26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 60 additions and 64 deletions

View file

@ -9,6 +9,7 @@ on:
jobs:
build:
name: Build Blog-only
timeout-minutes: 30
runs-on: ubuntu-latest
steps:

View file

@ -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?

View file

@ -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?

View file

@ -9,6 +9,7 @@ on:
jobs:
publish-canary:
name: Publish Canary
runs-on: ubuntu-latest
strategy:
matrix:

View file

@ -6,7 +6,8 @@ on:
- main
jobs:
build:
lighthouse-report:
name: Lighthouse Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

View file

@ -7,6 +7,7 @@ on:
jobs:
lint:
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
steps:

View file

@ -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:

View file

@ -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

View file

@ -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