Skip to content

NSM Dashboard initial impl. #2

NSM Dashboard initial impl.

NSM Dashboard initial impl. #2

---
name: React Build & Test
on:
push:
branches:
- 'main'
- 'release/**'
pull_request:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20.9.0
- name: Install dependencies
run: npm install
- name: Build Docker image
run: docker build -t dashboard-ui .
- name: Run tests
run: |
docker run --rm -d -p 3000:3000 --name dashboard-ui-container dashboard-ui
sleep 10 # Wait for the application to start
docker exec dashboard-ui-container curl -I http://localhost:3000
docker stop dashboard-ui-container
- name: Cleanup
run: docker rmi dashboard-ui