Skip to content

Commit

Permalink
Merge pull request #8 from isha2012/pullReqTest
Browse files Browse the repository at this point in the history
Pull req test
  • Loading branch information
isha2012 authored Nov 16, 2024
2 parents 27892d2 + 33292a7 commit 618b51a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,20 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
# Step 3: Install dependencies
- name: Install dependencies
run: npm install



# Step 4: Build the TypeScript code
- name: Build project
run: npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Pull Request CI

on:
pull_request:
branches: [ "prTest2" ]
branches: [ "prTest1" ]

jobs:
test:
Expand Down
13 changes: 10 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ const PORT = process.env.PORT || 3000;
app.get('/', (req: Request, res: Response) => {
res.json({ message: 'Hello, GitHub Actions!' });
});

app.get('/test', (req: Request, res: Response) => {
res.json({ message: 'Hello, GitHub Actions! Testing Pull Request.' });
res.json({ message: 'Hello, GitHub Actions! Testing Pull Request. This route has been updated' });
});
app.get('/about', (req: Request, res: Response) => {
res.json({ message: 'Hello, GitHub Actions! About Us branch.' });
});
app.get('/cache', (req: Request, res: Response) => {
res.json({ message: 'Hello, GitHub Actions! Testing cache.' });
});
app.get('/pullRequest', (req: Request, res: Response) => {
res.json({ message: 'Hello, GitHub Actions! Testing pull reuqest.' });
app.get('/pullReqTest', (req: Request, res: Response) => {
res.json({ message: 'Hello, GitHub Actions! Testing pull reuqest 2nd time.' });
});

// Export the app for testing purposes
Expand Down

0 comments on commit 618b51a

Please sign in to comment.