Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: support .env.test to reuse env variables across the tests #6408

Merged
merged 38 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7b7c3d8
Variables using .env file
nazarhussain Feb 7, 2024
f31b8a0
Add env variable support to normal tests
nazarhussain Feb 7, 2024
f5f2d07
Fix the order of variables
nazarhussain Feb 7, 2024
9f5e952
Update the order of jobs
nazarhussain Feb 7, 2024
74bff39
Export the varible using actions toolkit
nazarhussain Feb 7, 2024
960857f
Update the workflow tasks
nazarhussain Feb 7, 2024
a9cff16
Fix the sim workflow
nazarhussain Feb 7, 2024
df430e5
Add .env.test file support to tests
nazarhussain Feb 7, 2024
6df8db7
Fix the lint
nazarhussain Feb 7, 2024
b2ea491
Update the task description
nazarhussain Feb 8, 2024
c69eb6a
Move lodestar preset to env file
nazarhussain Feb 8, 2024
b3972b6
Fix the directory path
nazarhussain Feb 8, 2024
13a6e40
newline
nflaig Feb 8, 2024
3a2a2e3
Update debugging spec tests section
nflaig Feb 8, 2024
254ab1e
Update the env variable for preset
nazarhussain Feb 8, 2024
d9f3e6c
Merge branch 'nh/share-env-variables' of github.com:ChainSafe/lodesta…
nazarhussain Feb 8, 2024
1a3b462
Fix the path for setup files
nazarhussain Feb 8, 2024
570073d
Update code as per feedback
nazarhussain Feb 8, 2024
a652a8e
Fix the e2e variables
nazarhussain Feb 8, 2024
7b48e14
Update doc
nazarhussain Feb 8, 2024
e90f2fb
Fix the bash script
nazarhussain Feb 8, 2024
6feebc4
Fix sim geth runne
nazarhussain Feb 8, 2024
f1df354
Update the env file
nazarhussain Feb 8, 2024
ba14c9b
Fix e2e tests
nazarhussain Feb 8, 2024
b8e6d31
Update the script tasks
nazarhussain Feb 8, 2024
a9cc9c7
Update the script tasks
nazarhussain Feb 8, 2024
6586b7d
Add minimal for e2e tests
nazarhussain Feb 8, 2024
b7eff85
Add minimal for e2e tests
nazarhussain Feb 8, 2024
26a4c36
Update comments in preset tests
nflaig Feb 9, 2024
8cf47b3
Downgrade nethermind version
nazarhussain Feb 9, 2024
c96a5f2
Merge branch 'nh/share-env-variables' of github.com:ChainSafe/lodesta…
nazarhussain Feb 9, 2024
8333cea
Load env file in e2e env
nazarhussain Feb 9, 2024
53c4a15
Add the issue link in env variable
nazarhussain Feb 10, 2024
b74d8a3
Update bash script for failsafe current dir
nazarhussain Feb 10, 2024
0d1416b
Fix the mistaken genesis extension for el nodes
nazarhussain Feb 10, 2024
76960f7
Add missing capella wait for one test
nazarhussain Feb 10, 2024
6b3522d
Downgrade the geth version
nazarhussain Feb 12, 2024
3b2142e
Update .env.test
nflaig Feb 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# We use these images during sim and e2e tests
GETH_DOCKER_IMAGE=ethereum/client-go:v1.13.11
# Use either image or local binary for the testing
GETH_BINARY_DIR=
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:v4.6.0-amd64-modern-dev
NETHERMIND_DOCKER_IMAGE=nethermind/nethermind:1.25.3
# We mostly use mainnet for unit testing
# Changing this value may impact the tests which are written with mainnet in mind
LODESTAR_PRESET=mainnet
5 changes: 5 additions & 0 deletions .github/actions/dotenv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: "Setup env variables using .env file"
description: "Load .env file from root of repo and setup for CI runner"
runs:
using: "node20"
main: index.js
29 changes: 29 additions & 0 deletions .github/actions/dotenv/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const fs = require("fs");
const core = require("@actions/core");
const dotEnv = require("dotenv");
const envFile = ".env.test";

if (!fs.existsSync(envFile)) {
core.setFailed("File .env not found");
}

const result = dotEnv.config({path: envFile});
if (result.error) {
core.setFailed(result.error.message);
} else {
core.setOutput("env", result.parsed);
core.info("Env file loaded");
core.info("Populating env variables...");

for (const key in result.parsed) {
const value = result.parsed[key];
core.info(`${key}=${value}`);

// Export variable
core.exportVariable(key, value);

// Set to output so it can be used in as the input for the next job/step
core.setOutput(key, value);

}
}
8 changes: 3 additions & 5 deletions .github/workflows/test-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ on:
type: number
default: 40

env:
GETH_DOCKER_IMAGE: ethereum/client-go:v1.13.11
LIGHTHOUSE_DOCKER_IMAGE: sigp/lighthouse:latest-amd64-modern-dev
NETHERMIND_DOCKER_IMAGE: nethermind/nethermind:1.25.3

jobs:
tests-sim:
name: Sim tests
Expand Down Expand Up @@ -58,6 +53,9 @@ jobs:
if: steps.cache-deps.outputs.cache-hit == 'true'
# </common-build>

- name: Load env variables
uses: ./.github/actions/dotenv

- name: Download required docker images before running tests
run: |
docker pull ${{env.GETH_DOCKER_IMAGE}}
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
pull_request:
workflow_dispatch:

env:
GETH_DOCKER_IMAGE: ethereum/client-go:v1.11.6
NETHERMIND_DOCKER_IMAGE: nethermind/nethermind:1.18.0

jobs:
build:
name: Build
Expand Down Expand Up @@ -225,6 +221,9 @@ jobs:
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ github.sha }}
fail-on-cache-miss: true

- name: Load env variables
uses: ./.github/actions/dotenv

- name: Run the e2e test environment
run: scripts/run_e2e_env.sh start

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To run tests:
Note that to run `test:e2e`, first ensure that the environment is correctly setup by running the `run_e2e_env.sh` script.

```sh
GETH_DOCKER_IMAGE=ethereum/client-go:v1.11.6 NETHERMIND_DOCKER_IMAGE=nethermind/nethermind:1.18.0 ./scripts/run_e2e_env.sh start
./scripts/run_e2e_env.sh start
```

Similarly, run `yarn download-spec-tests` before running `yarn test:spec`.
Expand Down Expand Up @@ -63,9 +63,9 @@ If you observe following error running any of the test files that means you are
- Spec tests often compare full expected vs actual states in JSON format.
- A single logical error can cause many spec tests to fail. To focus on a single test at a time you can use vitest's option `--bail 1` to stop at the first failed test
- To then run only that failed test you can run against a specific file as use vitest's filters option `-t <pattern>` to run only one case
- Before running the tests, make sure to switch to the package directory (e.g. `packages/beacon-node`) to speed up test execution

```sh
cd packages/beacon-node
LODESTAR_PRESET=minimal yarn vitest --run --bail 1 --config vitest.spec.config.ts test/spec/presets/sanity.test.ts -t attester_slashing
nflaig marked this conversation as resolved.
Show resolved Hide resolved
nazarhussain marked this conversation as resolved.
Show resolved Hide resolved
```

Expand Down
14 changes: 4 additions & 10 deletions docs/pages/contribution/testing/simulation-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ There are a number of sim tests that are available and each has a slightly diffe

### Environment Variables

To see what typical values for these are check out the `test-sim.yaml` workflow file in the `.github/workflows` directory.
To see what typical values for these are check out the `.env.test` file in the root directory.

- `GETH_DOCKER_IMAGE`: The geth docker image that will be used
- `NETHERMIND_IMAGE`: The nethermind docker image that will be used
Expand All @@ -23,19 +23,15 @@ To see what typical values for these are check out the `test-sim.yaml` workflow
The multi-fork sim test checks most of the functionality Lodestar provides. Is verifies that Lodestar is capable of peering, moving through all of the forks and using various sync methods in a testnet environment. Lodestar is tested with both Geth and Nethermind as the execution client. It also checks a Lighthouse/Geth node for cross client compatibility.

```sh
GETH_DOCKER_IMAGE=ethereum/client-go:v1.11.6 \
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:latest-amd64-modern-dev \
NETHERMIND_DOCKER_IMAGE=nethermind/nethermind:1.18.0 \
yarn workspace @chainsafe/lodestar test:sim:multifork
yarn workspace @chainsafe/lodestar test:sim:multifork
```

### `test:sim:endpoints`

This tests that various endpoints of the beacon node and validator client are working as expected.

```sh
GETH_DOCKER_IMAGE=ethereum/client-go:v1.11.6 \
yarn workspace @chainsafe/lodestar test:sim:endpoints
yarn workspace @chainsafe/lodestar test:sim:endpoints
```

### `test:sim:deneb`
Expand All @@ -47,9 +43,7 @@ This test is still included in our CI but is no longer as important as it once w
Checks that Lodestar is compatible with other consensus validators and vice-versa. All tests use Geth as the EL.

```sh
GETH_DOCKER_IMAGE=ethereum/client-go:v1.11.6 \
LIGHTHOUSE_DOCKER_IMAGE=sigp/lighthouse:latest-amd64-modern-dev \
yarn workspace @chainsafe/lodestar test:sim:mixedclient
yarn workspace @chainsafe/lodestar test:sim:mixedclient
```

## Sim Test Infrastructure
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@
"test-coverage:e2e-sim": "c8 --config .c8rc.json --report-dir coverage/e2e-sim/ --all npm run test:e2e:sim",
"test-coverage:spec": "c8 --config .c8rc.json --report-dir coverage/spec/ --all npm run test:spec",
"benchmark": "yarn benchmark:files 'packages/*/test/perf/**/*.test.ts'",
"benchmark:files": "LODESTAR_PRESET=mainnet NODE_OPTIONS='--max-old-space-size=4096 --loader=ts-node/esm' benchmark --config .benchrc.yaml --defaultBranch unstable",
"benchmark:files": "NODE_OPTIONS='--max-old-space-size=4096 --loader=ts-node/esm' benchmark --config .benchrc.yaml --defaultBranch unstable",
"release:create-rc": "node scripts/release/create_rc.mjs",
"release:tag-rc": "node scripts/release/tag_rc.mjs",
"release:tag-stable": "node scripts/release/tag_stable.mjs",
"release:publish": "lerna publish from-package --yes --no-verify-access"
},
"devDependencies": {
"@actions/core": "^1.10.1",
"@chainsafe/eslint-plugin-node": "^11.2.3",
"@dapplion/benchmark": "^0.2.4",
"@types/mocha": "^10.0.6",
Expand All @@ -56,6 +57,7 @@
"@vitest/browser": "^1.2.1",
"codecov": "^3.8.3",
"crypto-browserify": "^3.12.0",
"dotenv": "^16.4.1",
"electron": "^26.2.2",
"eslint": "^8.50.0",
"eslint-import-resolver-typescript": "^3.6.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/beacon-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@
"lint": "eslint --color --ext .ts src/ test/",
"lint:fix": "yarn run lint --fix",
"test": "yarn test:unit && yarn test:e2e",
"test:unit:minimal": "vitest --run --segfaultRetry 3 --dir test/unit/",
"test:unit:mainnet": "LODESTAR_PRESET=mainnet vitest --run --dir test/unit-mainnet",
"test:unit:minimal": "LODESTAR_PRESET=minimal vitest --run --segfaultRetry 3 --dir test/unit/",
"test:unit:mainnet": "LODESTAR_PRESET=mainnet vitest --run --segfaultRetry 3 --dir test/unit-mainnet",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this segfaultRetry was added. what does that do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was earlier added in minimal preset and missing in mainnet. It just check if tests fails with a segfault error, it tries to rerun it.

"test:unit": "wrapper() { yarn test:unit:minimal $@ && yarn test:unit:mainnet $@; }; wrapper",
nflaig marked this conversation as resolved.
Show resolved Hide resolved
"test:e2e": "LODESTAR_PRESET=minimal vitest --run --segfaultRetry 3 --config vitest.e2e.config.ts --dir test/e2e",
"test:e2e": "vitest --run --segfaultRetry 3 --config vitest.e2e.config.ts --dir test/e2e",
"test:sim": "vitest --run test/sim/**/*.test.ts",
"test:sim:merge-interop": "vitest --run test/sim/merge-interop.test.ts",
"test:sim:mergemock": "vitest --run test/sim/mergemock.test.ts",
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"lint:fix": "yarn run lint --fix",
"test:unit": "vitest --run --dir test/unit/",
"test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e/",
"test:sim:multifork": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/multi_fork.test.ts",
"test:sim:mixedclient": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/mixed_client.test.ts",
"test:sim:endpoints": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/endpoints.test.ts",
"test:sim:deneb": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/deneb.test.ts",
"test:sim:backup_eth_provider": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/backup_eth_provider.test.ts",
"test:sim:multifork": "LODESTAR_PRESET=minimal DOTENV_CONFIG_PATH=../../.env.test node -r dotenv/config --loader ts-node/esm test/sim/multi_fork.test.ts",
"test:sim:mixedclient": "LODESTAR_PRESET=minimal DOTENV_CONFIG_PATH=../../.env.test node -r dotenv/config --loader ts-node/esm test/sim/mixed_client.test.ts",
"test:sim:endpoints": "LODESTAR_PRESET=minimal DOTENV_CONFIG_PATH=../../.env.test node -r dotenv/config --loader ts-node/esm test/sim/endpoints.test.ts",
"test:sim:deneb": "LODESTAR_PRESET=minimal DOTENV_CONFIG_PATH=../../.env.test node -r dotenv/config --loader ts-node/esm test/sim/deneb.test.ts",
"test:sim:backup_eth_provider": "LODESTAR_PRESET=minimal DOTENV_CONFIG_PATH=../../.env.test node -r dotenv/config --loader ts-node/esm test/sim/backup_eth_provider.test.ts",
"test": "yarn test:unit && yarn test:e2e",
"coverage": "codecov -F lodestar",
"check-readme": "typescript-docs-verifier"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const generateGethNode: ExecutionNodeGenerator<ExecutionClient.Geth> = (o
const {id, mode, ttd, address, mining, clientOptions, nodeIndex} = opts;
const ports = getNodePorts(nodeIndex);

const isDocker = process.env.GETH_DOCKER_IMAGE !== undefined;
const isDocker = !!process.env.GETH_DOCKER_IMAGE;
const binaryPath = isDocker ? "" : `${process.env.GETH_BINARY_DIR}/geth`;
const {rootDir, rootDirMounted, genesisFilePathMounted, logFilePath, jwtsecretFilePathMounted} = getNodeMountedPaths(
opts.paths,
Expand Down
2 changes: 1 addition & 1 deletion packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"test:browsers:chrome": "vitest --run --browser chrome --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:firefox": "vitest --run --browser firefox --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:electron": "echo 'Electron tests will be introduced back in the future as soon vitest supports electron.'",
"test:e2e": "LODESTAR_PRESET=minimal vitest --run --config vitest.e2e.config.ts --dir test/e2e",
nflaig marked this conversation as resolved.
Show resolved Hide resolved
"test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e",
"check-readme": "typescript-docs-verifier"
},
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/params/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"test:browsers:chrome": "vitest --run --browser chrome --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:firefox": "vitest --run --browser firefox --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:electron": "echo 'Electron tests will be introduced back in the future as soon vitest supports electron.'",
"test:e2e": "LODESTAR_PRESET=minimal vitest --run --config vitest.e2e.config.ts --dir test/e2e/",
"test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e/",
"check-readme": "typescript-docs-verifier"
},
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions packages/params/test/e2e/overridePreset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ describe("Override preset", function () {
vi.setConfig({testTimeout: 30_000});

it("Should correctly override preset", async () => {
// These commands can not run with minimal preset
if (process.env.LODESTAR_PRESET === "minimal") delete process.env.LODESTAR_PRESET;
if (process.env.LODESTAR_PRESET) delete process.env.LODESTAR_PRESET;
nflaig marked this conversation as resolved.
Show resolved Hide resolved

await exec(`node --loader ts-node/esm ${path.join(__dirname, scriptNames.ok)}`);
});
Expand Down
3 changes: 1 addition & 2 deletions packages/params/test/e2e/setPreset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ describe("setPreset", function () {
vi.setConfig({testTimeout: 30_000});

it("Should correctly set preset", async () => {
// These commands can not run with minimal preset
if (process.env.LODESTAR_PRESET === "minimal") delete process.env.LODESTAR_PRESET;
if (process.env.LODESTAR_PRESET) delete process.env.LODESTAR_PRESET;

await exec(`node --loader ts-node/esm ${path.join(__dirname, scriptNames.ok)}`);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/prover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"test:browsers:chrome": "vitest --run --browser chrome --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:firefox": "vitest --run --browser firefox --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:electron": "echo 'Electron tests will be introduced back in the future as soon vitest supports electron.'",
"test:e2e": "LODESTAR_PRESET=minimal vitest --run --config vitest.e2e.config.ts --dir test/e2e",
"test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e",
"check-readme": "typescript-docs-verifier",
"generate-fixtures": "node --loader ts-node/esm scripts/generate_fixtures.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"test": "yarn test:unit",
"test:constants:minimal": "LODESTAR_PRESET=minimal vitest --run --dir test/constants/",
"test:constants:mainnet": "LODESTAR_PRESET=mainnet vitest --run --dir test/constants/",
"test:unit": "wrapper() { yarn test:constants:minimal $@ && yarn test:constants:mainnet $@ && vitest --run --dir test/unit/ $@; }; wrapper",
"test:unit": "wrapper() { yarn test:constants:minimal $@ && yarn test:constants:mainnet $@ && LODESTAR_PRESET=mainnet vitest --run --dir test/unit/ $@; }; wrapper",
"test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron",
"test:browsers:chrome": "vitest --run --browser chrome --config ./vitest.browser.config.ts --dir test/unit",
"test:browsers:firefox": "vitest --run --browser firefox --config ./vitest.browser.config.ts --dir test/unit",
Expand Down
2 changes: 1 addition & 1 deletion packages/validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test:unit": "vitest --run --dir test/unit/",
"test": "yarn test:unit && yarn test:e2e",
"test:spec": "vitest --run --config vitest.spec.config.ts --dir test/spec/",
"test:e2e": "LODESTAR_PRESET=mainnet vitest --run --config vitest.e2e.config.ts --dir test/e2e",
"test:e2e": "vitest --run --config vitest.e2e.config.ts --dir test/e2e",
"download-spec-tests": "node --loader=ts-node/esm test/spec/downloadTests.ts",
"coverage": "codecov -F lodestar-validator",
"check-readme": "typescript-docs-verifier"
Expand Down
1 change: 1 addition & 0 deletions scripts/run_e2e_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

function start_app() {
mkdir -p test-logs/e2e-test-env
source ../.env.test
export LODESTAR_PRESET=minimal
nohup node --loader ts-node/esm packages/cli/test/scripts/e2e_test_env.ts > test-logs/e2e-test-env/simulation.out 2>&1 &
echo $! > test-logs/e2e-test-env/simulation.pid
Expand Down
8 changes: 8 additions & 0 deletions scripts/vitest/setupFiles/dotenv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import path from "node:path";
// It's a dev dependency
// eslint-disable-next-line import/no-extraneous-dependencies
import {config} from "dotenv";
// eslint-disable-next-line @typescript-eslint/naming-convention
const __dirname = new URL(".", import.meta.url).pathname;

config({path: path.join(__dirname, "../../../.env.test")});
2 changes: 1 addition & 1 deletion vitest.base.browser.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
],
setupFiles: [path.join(__dirname, "./scripts/vitest/customMatchers.ts")],
setupFiles: [path.join(__dirname, "./scripts/vitest/setupFiles/customMatchers.ts")],
reporters: ["default", "hanging-process"],
coverage: {
enabled: false,
Expand Down
5 changes: 4 additions & 1 deletion vitest.base.unit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ export default defineConfig({
"**/.{idea,git,cache,output,temp}/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
],
setupFiles: [path.join(__dirname, "./scripts/vitest/customMatchers.ts")],
setupFiles: [
path.join(__dirname, "./scripts/vitest/setupFiles/customMatchers.ts"),
path.join(__dirname, "./scripts/vitest/setupFiles/dotenv.ts"),
],
reporters: ["default", "hanging-process"],
coverage: {
enabled: process.env.CI === "true",
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
semver "^6.1.0"
uuid "^3.3.3"

"@actions/core@^1.10.1":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.1.tgz#61108e7ac40acae95ee36da074fa5850ca4ced8a"
integrity sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==
dependencies:
"@actions/http-client" "^2.0.1"
uuid "^8.3.2"

"@actions/core@^1.2.6":
version "1.10.0"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.10.0.tgz#44551c3c71163949a2f06e94d9ca2157a0cfac4f"
Expand Down Expand Up @@ -5617,6 +5625,11 @@ dotenv-expand@~10.0.0:
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37"
integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==

dotenv@^16.4.1:
version "16.4.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11"
integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==

dotenv@~16.3.1:
version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
Expand Down
Loading