Skip to content

Commit

Permalink
chore(ci): run V1 Build and Migration CLI tests conditionally on CI (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Simek authored Dec 2, 2020
1 parent e90749c commit 99e3ee7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- uses: preactjs/compressed-size-action@v2
with:
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}'
strip-hash: '\.([^;]\w{7})\.'
minimum-change-threshold: 100
1 change: 1 addition & 0 deletions .github/workflows/lighthouseCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
id: netlify
with:
site_name: 'docusaurus-2'
max_timeout: 300
- name: Audit URLs using Lighthouse
id: lighthouse_audit
uses: treosh/lighthouse-ci-action@v3
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/migration-cli-e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
name: Migration CLI E2E Test

on:
push:
branches:
- master
pull_request:
branches:
- master

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:
needs: check
if: ${{ needs.check.outputs.migration == 'true' }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/nodejs-windows.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Windows Build Test

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand All @@ -16,13 +13,21 @@ jobs:
node: ['10']
steps:
- 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 }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Installation
run: yarn || yarn || yarn # 3 attempts to avoid timeout errors...
- name: Docusaurus 1 Build
if: steps.filter.outputs.v1 == 'true'
run: yarn build:v1
- name: Docusaurus 2 Build
run: yarn build:v2
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build:v2": "yarn workspace docusaurus-2-website build",
"build:v2:baseUrl": "yarn workspace docusaurus-2-website build:baseUrl",
"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:v2": "yarn workspace docusaurus-2-website serve",
"serve:v2:baseUrl": "serve website",
Expand Down

0 comments on commit 99e3ee7

Please sign in to comment.