-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
43 lines (41 loc) · 1.03 KB
/
.gitlab-ci.yml
File metadata and controls
43 lines (41 loc) · 1.03 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
stages:
- setup_tests
- run_tests
- pages
- automated-api-tests
setup_and_run_tests:
stage: setup_tests
image: mcr.microsoft.com/playwright/python:v1.38.0-jammy
script:
- pip install --upgrade pip
- pip install -r requirements.txt
- cp .env.example .env
- python test_dotenv.py
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright python -m playwright install --with-deps chromium
- pytest -vv --junitxml=reports/xml/report.xml --template=html1/index.html --report=reports/html/index.html
artifacts:
paths:
- reports
expire_in: 7 days # Store artifacts for a week
when: always
cache:
paths:
- .cache/pip # Cache pip dependencies
- /ms-playwright # Cache Playwright browsers
variables:
CI: "true"
pages:
stage: pages
script:
- ls -la
- ls -la reports/html
- mkdir -p public
- cp -r reports/html/* public/
dependencies:
- setup_and_run_tests
artifacts:
paths:
- public
expire_in: 7 days
only:
- main # Deploy only on the main branch