-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
37 lines (32 loc) · 1.13 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
image: python:3.11
services:
- postgres:16
variables:
POSTGRES_DB: sodar_django_site
POSTGRES_USER: sodar_django_site
POSTGRES_PASSWORD: sodar_django_site
DATABASE_URL: postgres://sodar_django_site:sodar_django_site@postgres/sodar_django_site
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
- 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