From 089aa2c8266ac3e5c8328883f8ebfc475a2671c4 Mon Sep 17 00:00:00 2001 From: Ferran Buireu Date: Wed, 11 Sep 2024 20:33:07 +0200 Subject: [PATCH] ci: fix packagemanager --- .github/workflows/ut.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ut.yml b/.github/workflows/ut.yml index ae18ce0b..41bb9c4c 100644 --- a/.github/workflows/ut.yml +++ b/.github/workflows/ut.yml @@ -5,6 +5,7 @@ on: branches: [main] jobs: ut-tests: + name: Unit tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -14,6 +15,15 @@ jobs: - uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} + - name: Enable Corepack + run: corepack enable + - name: Get Yarn version from package.json + id: yarn_version + run: | + YARN_VERSION=$(jq -r '.packageManager' package.json | grep -o 'yarn@[0-9]*\.[0-9]*\.[0-9]*') + echo "YARN_VERSION=${YARN_VERSION}" >> $GITHUB_ENV + - name: Install correct Yarn version + run: corepack prepare ${{ env.YARN_VERSION }} --activate - name: Install dependencies run: yarn install --frozen-lockfile - name: Execute Unit tests