From e614fd57318971d31e33913b7645f851e32496cd Mon Sep 17 00:00:00 2001 From: Cristi Ciobanu Date: Fri, 9 Aug 2024 20:19:56 +0200 Subject: [PATCH] Docs: update GitHub workflow file for running tests (#11173) I tried following the guide and added the workflow to my repo but then the action failed with the following error: ``` error This project's package.json defines "packageManager": "yarn@4.1.0". However the current global version of Yarn is 1.22.22. Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19. Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack. Error: Process completed with exit code 1. ``` I enabled Corepack and the workflow run correctly. Added the extra step in the docs for the people that might incur in the same issue. Also updated the `actions/checkout` and `actions/setup-node` to v4. --- docs/docs/how-to/test-in-github-actions.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/docs/how-to/test-in-github-actions.md b/docs/docs/how-to/test-in-github-actions.md index d69484779906..8b45f2f899fc 100644 --- a/docs/docs/how-to/test-in-github-actions.md +++ b/docs/docs/how-to/test-in-github-actions.md @@ -226,11 +226,12 @@ jobs: - 5432:5432 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - run: corepack enable # install all the dependencies - run: yarn install # build the redwood app @@ -325,11 +326,12 @@ jobs: - 5432:5432 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - run: corepack enable # install all the dependencies - run: yarn install # build the redwood app