-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
72 lines (61 loc) · 2.19 KB
/
.gitlab-ci.yml
File metadata and controls
72 lines (61 loc) · 2.19 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
include:
- project: "dokos/docli"
ref: develop
file: "/.gitlab-ci.base.yml"
stages:
- Semgrep
- Test
variables:
DOCLI_IMAGE: "registry.gitlab.com/dokos/docli:ci-next"
tests:
image: $DOCLI_IMAGE
stage: Test
rules:
- if: $SKIP_TESTS == "true"
when: never
- if: $CI_COMMIT_TAG != null
allow_failure: true # Prevent flaky tests from breaking releases
- when: always
services:
- name: mariadb:10.8
command: ['mariadbd', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--character-set-client-handshake=FALSE', '--innodb_read_only_compressed=OFF']
- name: redis
alias: redis_queue
- name: redis
alias: redis_cache
- name: redis
alias: redis_socketio
variables:
MYSQL_DATABASE: "test_dodock"
MYSQL_ROOT_PASSWORD: "test_dodock"
before_script:
- set -e
- export APPS_BRANCH="$(/ci-utils/get-branch.sh)"
- bench init . --ignore-exist --no-backups --skip-redis-config-generation --skip-assets --frappe-branch ${FRAPPE_BRANCH:-$APPS_BRANCH}
- bench get-app https://gitlab.com/dokos/payments.git --branch ${PAYMENTS_BRANCH:-$APPS_BRANCH}
- bench get-app https://gitlab.com/dokos/dokos.git --branch ${DOKOS_BRANCH:-$APPS_BRANCH}
- bench get-app /builds/dokos/ocr/
- /ci-utils/setup-redis.sh v1
- /ci-utils/patch-procfile.sh v1
- cp -r apps/frappe/test_sites/test_site sites/
- bench setup requirements --dev
- bench start &> bench_start.log &
- bench build --app erpnext &
- build_pid=$!
- bench --site test_site reinstall --yes --mariadb-root-password test_dodock
- bench --site test_site install-app payments
- bench --site test_site install-app erpnext
- bench --site test_site install-app ocr
- wait $build_pid
script:
- bench --site test_site run-parallel-tests --app ocr
semgrep:
stage: Semgrep
image: semgrep/semgrep
allow_failure: true
before_script:
- git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
script: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness
rules:
- if: $CI_MERGE_REQUEST_IID
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH