Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): run V1 Build and Migration CLI tests conditionally on CI #3863

Merged
merged 6 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -23,6 +23,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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange that it works because on another brranch it fails due to missing git checkout step (I think)

#3907

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