From 03943e99bc5146a7ac607f852b5f0a36244d6898 Mon Sep 17 00:00:00 2001 From: Vadim Yavorsky Date: Wed, 18 Dec 2024 19:26:17 +0000 Subject: [PATCH] Update GitHub Actions workflows to use checkout@v4 and enable caching for yarn and pip --- .github/workflows/publish.yml | 15 ++------------- .github/workflows/test.yml | 16 +++------------- 2 files changed, 5 insertions(+), 26 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9f0ffbd..81293d3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,25 +16,14 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - uses: actions/checkout@v4 - name: Set up Node uses: actions/setup-node@v2 with: node-version: 18 registry-url: 'https://registry.npmjs.org' + cache: 'yarn' - name: Install project run: yarn diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d73984..fafd992 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,29 +6,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v2 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - uses: actions/checkout@v4 - name: Set up Node uses: actions/setup-node@v2 with: node-version: 18 + cache: 'yarn' - name: Set up Python uses: actions/setup-python@v2 with: python-version: 3.9 + cache: 'pip' - name: Install project run: yarn