Skip to content

Commit b3bb64e

Browse files
committed
first commit
0 parents  commit b3bb64e

File tree

8 files changed

+5509
-0
lines changed

8 files changed

+5509
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
TestJob:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Test
27+
run: npm test --if-present
28+
# If you have lint:
29+
#- name: Lint
30+
# run: npm run lint --if-present
31+
32+
# If you have tests:
33+
#- name: Test
34+
# run: npm test --if-present
35+
36+
# If you have a build step (common in TS or frontend):
37+
#- name: Build
38+
# run: npm run build --if-present

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.env

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Learning Github CI + Testing with Jest

app.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const express = require("express");
2+
const app = express();
3+
4+
app.get("/", (req, res) => {
5+
res.send("Hello World!");
6+
});
7+
8+
app.get("/health", (req, res) => {
9+
res.sendStatus(200);
10+
});
11+
12+
module.exports = app;

0 commit comments

Comments
 (0)