From 0d909d6eeb27cc8447cd14cf18e7c218b23da30f Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:33:35 -0300 Subject: [PATCH] chore: cache --- .github/workflows/build.yml | 21 ++------------------- .github/workflows/lint.yml | 18 +----------------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7bfe8a30..91069c4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,29 +14,11 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> $GITHUB_ENV - - - run: echo $YARN_CACHE_DIR - - - name: Cache node modules - id: cache-npm - uses: actions/cache@v4 - env: - cache-name: cache-node-modules - with: - path: ${{ env.YARN_CACHE_DIR }} - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 20.11.1 + cache: "yarn" - name: Install dependencies run: yarn @@ -45,6 +27,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.9 + cache: "pip" - name: Install dependencies run: pip install -r requirements.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2f7a79a7..fa7fadc2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,27 +10,11 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - - name: Cache node modules - id: cache-npm - uses: actions/cache@v4 - env: - cache-name: cache-node-modules - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 20.11.1 + cache: "yarn" - name: Install dependencies run: yarn