Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,28 @@ jobs:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

# Adicionar essa na de PR de DEV para PROD
# integration:
# runs-on: ubuntu-latest
#
# steps:
# - name: 📥 Verificar branches conflitantes
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: 🔑 Configurar credenciais do Git
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# - name: 🔍 Testar merge main <- develop
# run: |
# git fetch origin
# git checkout main
# git merge --no-commit --no-ff origin/develop || (
# echo "❌ Conflitos detectados entre main e develop" && exit 1
# )
# git merge --abort || true
# echo "✅ Nenhum conflito entre main e develop"
integration:
runs-on: ubuntu-latest

steps:
- name: 📥 Verificar branches conflitantes
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🔑 Configurar credenciais do Git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: 🔍 Testar merge main <- develop
run: |
git fetch origin
git checkout main
git merge --no-commit --no-ff origin/develop || (
echo "❌ Conflitos detectados entre main e develop" && exit 1
)
git merge --abort || true
echo "✅ Nenhum conflito entre main e develop"
check:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -153,4 +153,4 @@ jobs:
run: npm install

- name: 🚀 Build do projeto
run: npm run build
run: npm run build
2 changes: 2 additions & 0 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { tablesSessionsRoutes } from './tables-sessions-routes';
import { ordersRoutes } from './orders-routes';
import { metricsRoutes } from './metrics';
import { healthRoutes } from './health';
import { presentationRoutes } from './presentation';

const routes = Router();
routes.use('/products', productsRoutes);
Expand All @@ -14,5 +15,6 @@ routes.use('/tables-sessions', tablesSessionsRoutes);
routes.use('/orders', ordersRoutes);
routes.use('/metrics', metricsRoutes);
routes.use('/health', healthRoutes);
routes.use('/presentation', presentationRoutes);

export { routes };
16 changes: 16 additions & 0 deletions src/routes/presentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Router, Request, Response } from 'express';

const presentationRoutes = Router();

presentationRoutes.get('/', async (_: Request, res: Response) => {
try {
res.json({
message: '✨ Novo endpoint, olá apresentação!',
timeStamp: new Date().toISOString(),
});
} catch (error) {

Check warning on line 11 in src/routes/presentation.ts

View workflow job for this annotation

GitHub Actions / check

'error' is defined but never used
res.status(500).send('Error generating metrics');
}
});

export { presentationRoutes };
Loading