Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ozziest committed Mar 10, 2024
1 parent e36c343 commit 9ff36a2
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: cp .env.example .env
- run: npm run build
- run: npx concurrently --kill-others "npm run start" "npx wait-on -t 5s http-get://localhost:3000/docs"
- name: Build the app
run: npm ci |
cp .env.example .env
npm run build
- name: Start the application
run: npm run start
background: true
- name: Test API endpoint
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/docs)
if [ $response == "200" ]; then
echo "API endpoint is reachable."
exit 0
else
echo "API endpoint is not reachable."
exit 1
fi

0 comments on commit 9ff36a2

Please sign in to comment.