Open
Description
Description:
Same cache us being reused, regardless of node versions. This brings prolonged time for once of the operations, and cache race conditions.
As can be seen from the images attached below, same cache key is used for both, but once is using node14, while the other is using node16.
Action version:
actions/checkout@v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
This is my Tests yaml
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
exec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: "pnpm"
This is my Version yaml
name: Version
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"
Expected behaviour:
Node version is taken into account on the cache generation key.
Actual behaviour:
Same cache is being used, which leads to longer pnpm install
steps, and cache race conditions.