-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitlab-ci.yml
More file actions
35 lines (30 loc) · 809 Bytes
/
gitlab-ci.yml
File metadata and controls
35 lines (30 loc) · 809 Bytes
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
image: python:3.11
stages:
- build
- test
- upload
variables:
ALLURE_RESULTS_DIR: allure-results
ALLURE_RESULTS_ZIP: allure-results.zip
ALLURE_PROJECT_ID: callook-automation-demo
ALLURE_API_URL: http://localhost:5050
before_script:
- pip install -r requirements.txt
- pip install allure-pytest
- mkdir -p $ALLURE_RESULTS_DIR
run-tests:
stage: run
script:
- python src/labra/testengine.py
- zip -r $ALLURE_RESULTS_ZIP $ALLURE_RESULTS_DIR
artifacts:
paths:
- $ALLURE_RESULTS_ZIP
expire_in: 1 hour
upload-report:
stage: upload
script:
- curl -X POST "$ALLURE_API_URL/send-results" \
-F "results=@$ALLURE_RESULTS_ZIP" \
-F "project_id=$ALLURE_PROJECT_ID"
- curl -X GET "$ALLURE_API_URL/generate-report?project_id=$ALLURE_PROJECT_ID"