-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
37 lines (35 loc) · 1.33 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
stages:
- build
- test
test_ci:
stage: test
image: hub.meri.dev/test-docker/test:latest
# only:
# - setup-ci
before_script:
- apt update && apt install -y libarchive-dev #libcurl4-openssl-dev
- apt install -y zlib1g-dev libicu-dev libcurl3 libcurl-openssl1.0-dev
- apt install -y build-essential cmake libssl-dev pkg-config cmake
- wget http://131.123.42.38/lmcrs/beta/srcML-Ubuntu18.04.deb
- dpkg -i srcML-Ubuntu18.04.deb
- mkdir -p ~/.ssh
- echo "${DEPLOY_KEY}" | tr -d '\r' > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- eval "$(ssh-agent -s)"
- ssh-keyscan -H "gitlab.com" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
- export LC_ALL=C.UTF-8
- export LANG=C.UTF-8
script:
- git config --global user.email "[email protected]"
- git config --global user.name "merico"
- pip3 install pipenv
- echo -e "machine gitlab.com\nlogin ${GITLAB_USER}\npassword ${GITLAB_PASSWD}" > ~/.netrc
- git clone https://gitlab.com/persper/code-analytics.git && cd code-analytics
#&& git checkout ${CI_COMMIT_REF_NAME}
- export PYTHONPATH=$PYTHONPATH:/root/code-analytics
- pipenv install --python 3.7
- pipenv run pytest -s test/test_analytics
- pipenv run pytest -s test/test_analytics2
- echo "Done"