Skip to content

Commit

Permalink
improve the Github CI setup for windows: make jobs run in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Dec 28, 2020
1 parent 8fb2674 commit 160d838
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/nodejs-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,47 @@ on:
- master

jobs:
build:
install:
runs-on: windows-latest
strategy:
matrix:
node: ['10']
steps:
- uses: actions/checkout@v2
- 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...

buildV1:
needs: install
runs-on: windows-latest
steps:
- 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 Jest Tests
run: yarn test

buildV2:
needs: install
runs-on: windows-latest
steps:
- name: Docusaurus 2 Build
run: yarn build:v2
env:
CI: true

testV2:
needs: install
runs-on: windows-latest
steps:
- name: Docusaurus 2 Jest Tests
run: yarn test

0 comments on commit 160d838

Please sign in to comment.