ci: enable yarn install cache (#4486)

* test: enable yarn install cache

* ci: correct cache key

* ci: update caching to use bahmutov/npm-install
This commit is contained in:
Armano 2021-03-25 16:29:32 +01:00 committed by GitHub
parent 17a7ce6d0d
commit 88a48a072a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 7 deletions

View file

@ -13,7 +13,9 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Lint - name: Lint
run: yarn lint:ci run: yarn lint:ci
- name: Prettier Code - name: Prettier Code

View file

@ -22,7 +22,9 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Migrate D1 website - name: Migrate D1 website
run: yarn test:v1Migration:migrate run: yarn test:v1Migration:migrate
- name: Build D1 migrated website - name: Build D1 migrated website

View file

@ -23,7 +23,9 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Test - name: Test
run: yarn test:v1 run: yarn test:v1
# Not useful to build v1 site because tests already build v1 (packages/docusaurus-1.x/lib/__tests__/build-files.test.js) # Not useful to build v1 site because tests already build v1 (packages/docusaurus-1.x/lib/__tests__/build-files.test.js)

View file

@ -16,6 +16,8 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Build blog-only - name: Build blog-only
run: yarn workspace docusaurus-2-website build:blogOnly run: yarn workspace docusaurus-2-website build:blogOnly

View file

@ -26,7 +26,9 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Setup test-website project against master release - name: Setup test-website project against master release
run: | run: |
yarn test:build:v2 yarn test:build:v2
@ -52,7 +54,9 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Setup test-website project against master release - name: Setup test-website project against master release
run: | run: |
KEEP_CONTAINER=true yarn test:build:v2 KEEP_CONTAINER=true yarn test:build:v2

View file

@ -23,6 +23,8 @@ jobs:
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- name: Installation - name: Installation
run: yarn uses: bahmutov/npm-install@v1
with:
install-command: yarn
- name: Test - name: Test
run: yarn test run: yarn test