From bf18a0d4ffe947bcafe1158f116858f63ebf4e65 Mon Sep 17 00:00:00 2001 From: Vadim Yavorsky Date: Wed, 18 Dec 2024 19:20:55 +0000 Subject: [PATCH] Upgrade actions/checkout to v4 and simplify caching in nightly build workflow --- .github/workflows/nightly_build.yml | 69 ++++------------------------- 1 file changed, 9 insertions(+), 60 deletions(-) diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 0ee89483..651baec7 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -11,36 +11,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@v4.2.0 - 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/cache@v4.2.0 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + - uses: actions/checkout@v4 - name: Install NODE JS uses: actions/setup-node@v2 with: node-version: ${{ env.NODE_VERSION }} + cache: yarn - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ env.PYTHON_VERSION }} + cae: pip - name: Install project run: yarn install @@ -56,36 +39,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@v4.2.0 - 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/cache@v4.2.0 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + - uses: actions/checkout@v4 - name: Install NODE JS uses: actions/setup-node@v2 with: node-version: ${{ env.NODE_VERSION }} + cache: yarn - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ env.PYTHON_VERSION }} + cache: pip - name: Install project run: yarn install @@ -99,36 +65,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@v4.2.0 - 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/cache@v4.2.0 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + - uses: actions/checkout@v4 - name: Install NODE JS uses: actions/setup-node@v2 with: node-version: ${{ env.NODE_VERSION }} + cache: yarn - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ env.PYTHON_VERSION }} + cache: pip - name: Install project run: yarn install