From 88a48a072a44eec27ef462ae1482e9ea41df15a3 Mon Sep 17 00:00:00 2001 From: Armano Date: Thu, 25 Mar 2021 16:29:32 +0100 Subject: [PATCH] ci: enable yarn install cache (#4486) * test: enable yarn install cache * ci: correct cache key * ci: update caching to use bahmutov/npm-install --- .github/workflows/lint.yml | 4 +++- .github/workflows/migration-cli.yml | 4 +++- .github/workflows/v1-tests.yml | 4 +++- .github/workflows/v2-build-blog-only.yml | 4 +++- .github/workflows/v2-tests-e2e.yml | 8 ++++++-- .github/workflows/v2-tests.yml | 4 +++- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f37813214e..538841179e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,7 +13,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Lint run: yarn lint:ci - name: Prettier Code diff --git a/.github/workflows/migration-cli.yml b/.github/workflows/migration-cli.yml index 9114cb44ca..05d8d4b603 100644 --- a/.github/workflows/migration-cli.yml +++ b/.github/workflows/migration-cli.yml @@ -22,7 +22,9 @@ jobs: with: node-version: ${{ matrix.node }} - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Migrate D1 website run: yarn test:v1Migration:migrate - name: Build D1 migrated website diff --git a/.github/workflows/v1-tests.yml b/.github/workflows/v1-tests.yml index b25926218f..6adb0a7e09 100644 --- a/.github/workflows/v1-tests.yml +++ b/.github/workflows/v1-tests.yml @@ -23,7 +23,9 @@ jobs: with: node-version: ${{ matrix.node }} - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Test 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) diff --git a/.github/workflows/v2-build-blog-only.yml b/.github/workflows/v2-build-blog-only.yml index 4a4c724f40..d7faa1ffee 100644 --- a/.github/workflows/v2-build-blog-only.yml +++ b/.github/workflows/v2-build-blog-only.yml @@ -16,6 +16,8 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Build blog-only run: yarn workspace docusaurus-2-website build:blogOnly diff --git a/.github/workflows/v2-tests-e2e.yml b/.github/workflows/v2-tests-e2e.yml index 155743b099..4b6706c3be 100644 --- a/.github/workflows/v2-tests-e2e.yml +++ b/.github/workflows/v2-tests-e2e.yml @@ -26,7 +26,9 @@ jobs: with: node-version: ${{ matrix.node }} - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Setup test-website project against master release run: | yarn test:build:v2 @@ -52,7 +54,9 @@ jobs: with: node-version: ${{ matrix.node }} - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Setup test-website project against master release run: | KEEP_CONTAINER=true yarn test:build:v2 diff --git a/.github/workflows/v2-tests.yml b/.github/workflows/v2-tests.yml index 17b21a188b..2928c48ebf 100644 --- a/.github/workflows/v2-tests.yml +++ b/.github/workflows/v2-tests.yml @@ -23,6 +23,8 @@ jobs: with: node-version: ${{ matrix.node }} - name: Installation - run: yarn + uses: bahmutov/npm-install@v1 + with: + install-command: yarn - name: Test run: yarn test