Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
user04f8 committed Oct 14, 2024
1 parent 0674afe commit 0423d63
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Node.js CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install dependencies
run: make install

- name: Run server
run: make run &

- name: Wait for server to start
run: sleep 10

- name: Test server is running
run: curl -I http://localhost:3000

- name: Stop server
run: kill $(lsof -t -i:3000) || true
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
install:
cd lsa-search-engine && npm install

run:
cd lsa-search-engine && npm run start

0 comments on commit 0423d63

Please sign in to comment.