From 7026db407ab80dc52eb6b51c7a3d0bf86ff69eab Mon Sep 17 00:00:00 2001 From: Vadim Yavorsky Date: Wed, 18 Dec 2024 19:35:14 +0000 Subject: [PATCH] Update GitHub Actions workflows to use updated action versions and improve caching --- .github/workflows/publish.yml | 29 ++++++----------------------- .github/workflows/test.yml | 27 +++++---------------------- 2 files changed, 11 insertions(+), 45 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ccbdd08..d65a89f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,39 +15,22 @@ env: jobs: publish: runs-on: ubuntu-latest - if: github.event.pull_request.merged - - 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- + if: github.event.pull_request.merged - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- + steps: + - 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 3.9 uses: actions/setup-python@v2 with: python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' - name: Install building tools run: pip3 install -r ./predeployed/scripts/requirements.txt @@ -93,7 +76,7 @@ jobs: release_name: ${{ env.VERSION }} draft: false prerelease: ${{ env.PRERELEASE }} - + - name: Upload Release Assets id: upload-release-assets uses: dwenegar/upload-release-assets@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ec94d9..1f35d76 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,43 +7,26 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x] - python-version: ["3.7.x", "3.8.x", "3.9.x"] + node-version: [18.x, 20.x] + python-version: ["3.8.x", "3.9.x", "3.10.x"] env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 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/cache@v2 - 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: ${{ matrix.node-version }} + cache: 'yarn' - name: Set up Python uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install project run: yarn install