From f04406f24f51e0d3926d7d8df17f1bb4c8233e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 10 Jun 2021 12:36:00 +0200 Subject: [PATCH] Move Yarn validation CI checks to a separate job (#13443) * Move Yarn validation CI checks to a separate job * Fix --- .github/workflows/ci.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b01230bc437..5a325a2c3dbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,24 @@ jobs: key: yarn-${{ hashFiles('yarn.lock') }} restore-keys: | yarn- + - name: 'Check or update Yarn cache (fix w/ "yarn install")' + env: + YARN_ENABLE_SCRIPTS: false # disable post-install scripts + YARN_NODE_LINKER: pnp # use pnp linker for better linking performance: it's meant to update yarn cache only + run: | + yarn install --immutable --skip-builds + + yarn-validate: + name: Validate Yarn dependencies and constraints + needs: prepare-yarn-cache + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Use Node.js latest + uses: actions/setup-node@v2-beta + with: + node-version: "*" - name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")' run: | yarn constraints @@ -30,12 +48,6 @@ jobs: if: steps.yarn-cache.outputs.cache-hit != 'true' run: | yarn dedupe --check - - name: 'Check or update Yarn cache (fix w/ "yarn install")' - env: - YARN_ENABLE_SCRIPTS: false # disable post-install scripts - YARN_NODE_LINKER: pnp # use pnp linker for better linking performance: it's meant to update yarn cache only - run: | - yarn install --immutable --skip-builds - name: Check for dependency cycles run: | yarn release-tool check-cycles