-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (79 loc) · 2.43 KB
/
regression-pipeline.yml
File metadata and controls
93 lines (79 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Regression Validation Pipeline
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
regression-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: docsdb
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout backend repo
uses: actions/checkout@v3
with:
path: backend
- name: Checkout QA repo
uses: actions/checkout@v3
with:
repository: ucudal/reto-xmas-2025-goland-ia-qa
token: ${{ secrets.GH_TOKEN }}
path: qa
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install docker-compose -y
- name: Set GUARDRAILS_API_KEY env file (RAGManager)
working-directory: backend/RAGManager
run: echo "GUARDRAILS_API_KEY=${{ secrets.GUARDRAILS_API_KEY }}" > .env
- name: Set GUARDRAILS_API_KEY env file (backend)
working-directory: backend
run: echo "GUARDRAILS_API_KEY=${{ secrets.GUARDRAILS_API_KEY }}" > .env
- name: Build and start backend app
working-directory: backend
run: docker-compose up -d docs-manager
- name: Wait for backend to be ready
run: |
for i in {1..30}; do
if curl -s http://localhost:8000/docs; then
echo "RAGManager is up!"
exit 0
fi
sleep 2
done
echo "RAGManager did not start in time" && exit 1
- name: Install QA dependencies
working-directory: qa
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run QA tests
working-directory: qa
run: |
pytest --maxfail=1 --disable-warnings --junitxml=report.xml
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: regression-test-report
path: qa/report.xml
- name: Tear down backend containers
working-directory: backend
run: |
docker-compose down