Skip to content

Commit

Permalink
Update GitHub Actions workflows to use updated action versions and im…
Browse files Browse the repository at this point in the history
…prove caching
  • Loading branch information
yavrsky committed Dec 18, 2024
1 parent 5452919 commit 7026db4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 45 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
27 changes: 5 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7026db4

Please sign in to comment.