Skip to content

Commit

Permalink
run tests before deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
ebisbe committed Jul 12, 2024
1 parent 1e84e1a commit a2ff569
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ddb_table=test_table
endpoint=https://esomxzwu88.execute-api.us-east-1.amazonaws.com
1 change: 1 addition & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ jobs:
SERVERLESS_ACCESS_KEY: ${{secrets.SERVERLESS_ACCESS_KEY}}
run: |
pnpm install
pnpm test
pnpm sls deploy
2 changes: 1 addition & 1 deletion jest.config.ddb.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: ["<rootDir>/setupEnv.ts"],

// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ["<rootDir>/setupFilesAfterEnv_dynalite.ts"],
Expand Down
3 changes: 3 additions & 0 deletions setupEnv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { config } from "dotenv";

config({ path: ".env.test" });

0 comments on commit a2ff569

Please sign in to comment.