From 2fe25b5740a7c861f79dea3a25d99217300cd569 Mon Sep 17 00:00:00 2001 From: Alessandro Jean <14254807+alessandrojean@users.noreply.github.com> Date: Sun, 21 Jan 2024 19:23:35 -0300 Subject: [PATCH] Replace yarn with pnpm in CI. --- .github/workflows/tests.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 645eaefa..c7f1c07c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,19 +15,33 @@ jobs: build: name: Run tests and build runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x] steps: - name: Clone repo uses: actions/checkout@v3 - - name: Setup Node.js ${{ matrix.node-version }} + - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: '20.x' + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: latest + run_install: false + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + - name: Setup pnpm cache + uses: actions/cache@v3 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: yarn install + run: pnpm install - name: Run tests - run: yarn test + run: pnpm test - name: Run build - run: yarn build + run: pnpm build