recreate 404 page and removed the comment part from onkar Pr #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Check Formatting, and Run Tests | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
frontend: | |
name: Frontend Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Lint Check | |
run: npm run lint | |
- name: ✅ Lint Check Passed | |
if: success() | |
run: echo "Linting successful ✅" | |
- name: Run Frontend Tests | |
run: npm test -- --ci --coverage | |
- name: ✅ Frontend Tests Passed | |
if: success() | |
run: echo "Frontend tests passed ✅" | |
- name: Build | |
run: npm run build | |
env: | |
VITE_BASE_URL: http://localhost:4000 | |
- name: ✅ Frontend Build Successful | |
if: success() | |
run: echo "Frontend build successful ✅" | |
- name: Run Frontend | |
run: | | |
echo "Starting Frontend Server..." | |
npm run dev & | |
env: | |
VITE_BASE_URL: http://localhost:4000 | |
- name: ✅ Frontend Server Started | |
if: success() | |
run: echo "Frontend server started successfully ✅" | |
backend: | |
name: Backend Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
cache: true | |
cache-dependency-path: backend/go.sum | |
- name: Install Dependencies | |
working-directory: backend | |
run: go mod download | |
- name: ✅ Dependencies Installed | |
if: success() | |
run: echo "Go dependencies installed successfully ✅" | |
- name: Check Go Formatting | |
working-directory: backend | |
run: | | |
if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then | |
echo "The following files are not formatted correctly:" | |
gofmt -l . | |
exit 1 | |
fi | |
- name: ✅ Formatting Check Passed | |
if: success() | |
run: echo "Go formatting check passed ✅" | |
- name: Build Backend | |
working-directory: backend | |
run: go build -v ./... | |
- name: ✅ Backend Build Successful | |
if: success() | |
run: echo "Backend build successful ✅" | |
- name: Run Backend | |
working-directory: backend | |
run: | | |
echo "Starting Backend Server..." | |
go run . & | |
- name: ✅ Backend Server Started | |
if: success() | |
run: echo "Backend server started successfully ✅" |