Skip to content

Commit b9e282b

Browse files
committed
feat: add GitHub Actions CI/CD pipeline
1 parent a683e13 commit b9e282b

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout código
15+
uses: actions/checkout@v3
16+
17+
- name: Configurar Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Instalar dependências
23+
run: pip install -r requirements.txt
24+
25+
- name: Rodar testes
26+
env:
27+
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
28+
run: |
29+
cd backend
30+
pytest tests/ -v
31+
32+
deploy:
33+
needs: test
34+
runs-on: ubuntu-latest
35+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
36+
37+
steps:
38+
- name: Trigger deploy no Render
39+
run: |
40+
curl -X POST ${{ secrets.RENDER_DEPLOY_HOOK }}

0 commit comments

Comments
 (0)