Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a7460c3
3 testes já estão funcionando, falta apenas o teste de um input de so…
Palacio-dev Nov 20, 2025
cd28c6c
Tratando caso em que o usuário digita apenas caracteres especiais
Palacio-dev Nov 20, 2025
2a5474e
Agora o usuário pode digitar %
Palacio-dev Nov 20, 2025
47dbf5e
Branch já está pronta para merge
Palacio-dev Nov 20, 2025
be7b50c
Testes sendo corrigidos
Palacio-dev Nov 21, 2025
246b6dc
Era culpa do João
Palacio-dev Nov 21, 2025
4b76dbf
Quase dando certo
Palacio-dev Nov 21, 2025
9ef8350
Fixing some tests
TheBorts Nov 21, 2025
ebd37c5
Merge remote-tracking branch 'refs/remotes/origin/Consertando-testes-…
TheBorts Nov 21, 2025
7de59a8
Testes do SignUp corrigidos e funcionais
Palacio-dev Nov 21, 2025
f6e532e
Agora os nomes podem ter o caractere especial til
Palacio-dev Nov 21, 2025
5b4fedb
Versão final dos testes do SignUp
Palacio-dev Nov 21, 2025
43e7e04
Atualizando CI
TheBorts Nov 21, 2025
56b3e9f
Atualizando CI
TheBorts Nov 21, 2025
2a1cf93
Atualizando CI
TheBorts Nov 22, 2025
dd07de9
Atualizando CI
TheBorts Nov 22, 2025
8abfc48
Atualizando CI
TheBorts Nov 22, 2025
dac76f8
Atualizando CI
TheBorts Nov 22, 2025
defb9fb
Atualizando CI
TheBorts Nov 22, 2025
f7db204
Atualizando CI
TheBorts Nov 22, 2025
b7ef8b8
Atualizando CI
TheBorts Nov 22, 2025
679320d
Atualizando CI
TheBorts Nov 22, 2025
3d5e0c6
Atualizando CI
TheBorts Nov 22, 2025
7ff0a1f
Merge branch 'fixing-ci' into 42-testes-feature-de-busca-receitas
AnaBeatrizHidalgo Nov 22, 2025
7e6a7e6
Merge pull request #58 from Palacio-dev/42-testes-feature-de-busca-re…
AnaBeatrizHidalgo Nov 22, 2025
1486bec
Atualizando CI
TheBorts Nov 22, 2025
227f8d5
Atualizando CI
TheBorts Nov 22, 2025
205bc5b
Atualizando CI
TheBorts Nov 22, 2025
a458991
Delete package-lock.json because of conflicts
gabcro Nov 22, 2025
e7a899a
Restore package lock file
gabcro Nov 22, 2025
04ea63e
Merge branch 'fixing-ci' into Consertando-testes-SignUp
gabcro Nov 22, 2025
1ad64f6
Merge pull request #59 from Palacio-dev/Consertando-testes-SignUp
gabcro Nov 22, 2025
8a3d5b3
Testes antigos apagados
Palacio-dev Nov 22, 2025
3b743a5
Fix to syntax errors in ProductSearchView.tsx
gabcro Nov 22, 2025
17a03a2
Arrumando testes RecipeSearch
Palacio-dev Nov 22, 2025
24fd4b4
testes SignUp corrigidos novamente
Palacio-dev Nov 22, 2025
289f20d
Apagando arquivo antigo
Palacio-dev Nov 22, 2025
17260fa
Atualizando CI
Palacio-dev Nov 22, 2025
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
119 changes: 37 additions & 82 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,100 +2,55 @@ name: CI

on:
push:
branches: [ main, '**' ]
pull_request:
branches: [ main ]
branches: [main]

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
backend:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CI: true
defaults:
run:
working-directory: auth-api
steps:
- uses: actions/checkout@v4

- name: Install Postgres server
run: |
sudo apt-get update
sudo apt-get install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo -u postgres psql -v ON_ERROR_STOP=1 <<'SQL'
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'test_user') THEN
CREATE ROLE test_user LOGIN PASSWORD 'teste123' CREATEDB;
ELSE
ALTER ROLE test_user LOGIN PASSWORD 'teste123' CREATEDB;
END IF;
END$$;
SQL

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: auth-api/package-lock.json

- name: Install deps (backend)
run: npm ci

- name: Create .env for CI
run: |
cat > .env <<'EOF'
PORT=4000
PGHOST=localhost
PGPORT=5432
PGDATABASE=logindb
PGUSER=test_user
PGPASSWORD=teste123
CORS_ORIGIN=http://localhost:3000
JWT_SECRET=ci_dummy_secret
EOF

- name: Init DB (calls initDb)
run: node --input-type=module -e "import('./src/db.js').then(m=>m.initDb())"

- name: Test (backend) -- if present
run: npm run test --if-present -- --watchAll=false --runInBand --verbose

frontend:
runs-on: ubuntu-latest
env:
CI: true
defaults:
run:
working-directory: saude_e_bem_estar
strategy:
matrix:
node-version: [18.x]

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

- name: Setup Node
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: |
package-lock.json

- name: Install deps (front)
run: npm ci

- name: Test (front)
# ---------------------------
# FRONTEND
# ---------------------------
- name: Install frontend dependencies
env:
CI: false
run: |
npm test -- --watchAll=false --runInBand --verbose
while true; do echo "Still getting dependencies..."; sleep 60; done &
npm install
npm ci
kill %1
working-directory: saude_e_bem_estar

- name: Build (front)
run: npm run build
- name: Build frontend
env:
CI: false
NODE_OPTIONS: --max-old-space-size=6144
run: |
while true; do echo "Still building..."; sleep 60; done &
npm run build
kill %1
working-directory: saude_e_bem_estar

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: front-build
path: |
dist
build
if-no-files-found: ignore
- name: Run frontend tests
run: CI=false npm test -- --verbose
working-directory: saude_e_bem_estar
Loading
Loading