-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
45 lines (41 loc) · 839 Bytes
/
.gitlab-ci.yml
File metadata and controls
45 lines (41 loc) · 839 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
36
37
38
39
40
41
42
43
44
45
stages:
- test
- build
- deploy
test_code:
image: naeemgtng/run-tests:latest
stage: test
artifacts:
when: always
paths:
- pytest_results.txt
reports:
junit:
- report.xml
variables:
UV_LINK_MODE: copy
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_BRANCH == "staging"'
changes:
- app/**/*
- .gitlab-ci.yml
- pytest.ini
- pyproject.toml
script:
- set +e
- uv sync --all-groups
- uv run pytest -rA $PWD/app/tests --junitxml=report.xml >> pytest_results.txt
- set -e
- cat pytest_results.txt
- |
if grep -q "100%" pytest_results.txt; then
exit 0
else
exit 1
fi
# build:
# image: ubuntu:latest
# script:
# - echo "building"