Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI/CD Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18.18.0"

- name: Install dependencies
run: npm install

- name: Run tests
run: npm run test:handler
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@
# LOCALSTACK
/volume/*
.local.env

# TESTING
/coverage/*
1 change: 1 addition & 0 deletions data/scripts/start_local_api_gateway_and_lambda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ ENDPOINT="${BASE_ENDPOINT}/restapis/${API_ID}/${STAGE}/_user_request_/items"
# Save the endpoint to a local environment file
echo "Saving the API endpoint to the local environment file..."
echo "LOCAL_API_ENDPOINT=${ENDPOINT}" > .local.env
echo "LOCAL_API_ID=${API_ID}" >> .local.env
echo ${GENERIC_SUCCESS_LOG}

# Output the API endpoint
Expand Down
17 changes: 17 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
moduleFileExtensions: ["js", "json", "ts"],
rootDir: ".",
testRegex: ".*\\.spec\\.ts$",
transform: {
"^.+\\.(t|j)s$": "ts-jest",
},
collectCoverageFrom: [
"src/**/*.{ts,js}",
"!src/**/__test__/**",
"!src/**/node_modules/**",
"!src/models/**",
"!src/schemas/**",
],
coverageDirectory: "coverage",
testEnvironment: "node",
};
Loading
Loading