From 3a8fecf68b2c1ca46a335b1f606bafb780718dd3 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Wed, 18 Dec 2024 19:00:10 +0100 Subject: [PATCH] Update download tasks --- .github/actions/multi-runtime-tests/action.yml | 11 ++++++++--- packages/ssz/test/specTestVersioning.ts | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/actions/multi-runtime-tests/action.yml b/.github/actions/multi-runtime-tests/action.yml index 2cab40b4..b38970f8 100644 --- a/.github/actions/multi-runtime-tests/action.yml +++ b/.github/actions/multi-runtime-tests/action.yml @@ -33,7 +33,6 @@ runs: run: ${{env.TEST_COMMAND}} test:browsers shell: bash - # Download spec tests with cache - name: Restore spec tests cache uses: actions/cache@master with: @@ -41,8 +40,14 @@ runs: key: spec-test-data-${{ hashFiles('packages/ssz/test/specTestVersioning.ts') }} - name: Download spec tests - if: inputs.runtime != 'nodejs' - run: ${{env.TEST_COMMAND}} test/spec/downloadTests.ts + if: inputs.runtime == 'deno' + run: yarn download-spec-tests + working-directory: packages/ssz + shell: bash + + - name: Download spec tests + if: inputs.runtime == 'bun' + run: bun run --bun test/spec/downloadTests.ts working-directory: packages/ssz shell: bash diff --git a/packages/ssz/test/specTestVersioning.ts b/packages/ssz/test/specTestVersioning.ts index d9f5ce47..ff21c2cf 100644 --- a/packages/ssz/test/specTestVersioning.ts +++ b/packages/ssz/test/specTestVersioning.ts @@ -9,4 +9,4 @@ import path from "node:path"; export const SPEC_TEST_REPO_URL = "https://github.com/ethereum/consensus-spec-tests"; export const SPEC_TEST_VERSION = "v1.4.0-beta.1"; -export const SPEC_TEST_LOCATION = path.join(import.meta.dirname, "../spec-tests"); +export const SPEC_TEST_LOCATION = path.join(__dirname, "../spec-tests");