-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
38 lines (33 loc) · 1.14 KB
/
.gitlab-ci.yml
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
image: python:3.11
services:
- postgres:16
variables:
POSTGRES_DB: sodar_core
POSTGRES_USER: sodar_core
POSTGRES_PASSWORD: sodar_core
DATABASE_URL: postgres://sodar_core:sodar_core@postgres/sodar_core
DEBIAN_FRONTEND: noninteractive
before_script:
# SSH setup taken from https://gitlab.com/gitlab-examples/ssh-private-key
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- sh ./utility/install_os_gitlab.sh
- sh ./utility/install_chrome_gitlab.sh
- python3 -m venv ./env
- source ./env/bin/activate
# - sh ./utility/install_python_dependencies.sh
- pip3 install "wheel>=0.38.4, <0.39"
- pip3 install -r ./requirements/local.txt
- pip3 install -r ./requirements/test.txt
all_tests:
script:
- python3 manage.py geticons
- python3 manage.py collectstatic --noinput
- coverage run --source="." manage.py test -v 2 --settings=config.settings.test
- coverage report
- make black arg=--check
- flake8 .
when: on_success