Skip to content

Commit

Permalink
Move Yarn validation CI checks to a separate job (#13443)
Browse files Browse the repository at this point in the history
* Move Yarn validation CI checks to a separate job

* Fix
  • Loading branch information
nicolo-ribaudo committed Jun 10, 2021
1 parent e914d12 commit f04406f
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -23,19 +23,31 @@ 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
- name: 'Check for duplicate dependencies (fix w/ "yarn dedupe")'
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
Expand Down

0 comments on commit f04406f

Please sign in to comment.