diff --git a/.env b/.env deleted file mode 100644 index e564ac6..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -ddb_table=test_table \ No newline at end of file diff --git a/.env.test b/.env.test new file mode 100644 index 0000000..b70f475 --- /dev/null +++ b/.env.test @@ -0,0 +1,2 @@ +ddb_table=test_table +endpoint=https://esomxzwu88.execute-api.us-east-1.amazonaws.com \ No newline at end of file diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 9fec6d1..9ab1ab8 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -16,4 +16,5 @@ jobs: SERVERLESS_ACCESS_KEY: ${{secrets.SERVERLESS_ACCESS_KEY}} run: | pnpm install + pnpm test pnpm sls deploy \ No newline at end of file diff --git a/jest.config.ddb.cjs b/jest.config.ddb.cjs index 148344d..3d5f46c 100644 --- a/jest.config.ddb.cjs +++ b/jest.config.ddb.cjs @@ -137,7 +137,7 @@ const config = { // runner: "jest-runner", // The paths to modules that run some code to configure or set up the testing environment before each test - setupFiles: ["dotenv/config"], + setupFiles: ["/setupEnv.ts"], // A list of paths to modules that run some code to configure or set up the testing framework before each test setupFilesAfterEnv: ["/setupFilesAfterEnv_dynalite.ts"], diff --git a/setupEnv.ts b/setupEnv.ts new file mode 100644 index 0000000..52f61ea --- /dev/null +++ b/setupEnv.ts @@ -0,0 +1,3 @@ +import { config } from "dotenv"; + +config({ path: ".env.test" });