fix cache key references #13456
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Block | ||
on: | ||
workflow_call: | ||
inputs: | ||
dep-cache-key: | ||
required: true | ||
type: string | ||
submodule-cache-key: | ||
required: true | ||
type: string | ||
workflow_dispatch: | ||
env: | ||
cwd: ${{github.workspace}}/packages/block | ||
defaults: | ||
run: | ||
working-directory: packages/block | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-block | ||
cancel-in-progress: true | ||
> tsc --build ./tsconfig.prod.esm.json | ||
jobs: | ||
test-block: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache/restore@v4 | ||
id: dep-cache | ||
with: | ||
path: ${{github.workspace}} | ||
key: ${{ inputs.dep-cache-key }} | ||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
- name: Install Dependencies (if not restored from cache) | ||
if: steps.dep-cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
working-directory: ${{ github.workspace }} | ||
- uses: actions/cache/restore@v4 | ||
name: Initialize ethereum-tests | ||
id: submodules-cache | ||
with: | ||
path: ${{github.workspace}}/packages/ethereum-tests | ||
key: ${{ inputs.submodule-cache-key}} | ||
- name: Check if ethereum-tests is present (if not, fail) | ||
if: steps.submodules-cache.outputs.cache-hit != 'true' | ||
run: exit 1 | ||
- run: npm run coverage | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: ${{ github.workspace}}/packages/block/coverage/lcov.info | ||
flags: block |