forked from guilhermecgs/ir
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
51 lines (45 loc) · 1.25 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
39
40
41
42
43
44
45
46
47
48
49
50
51
image: joyzoursky/python-chromedriver:3.7-selenium
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
stages:
- coverage_report
- relatorio
before_script:
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install -r requirements.txt
- echo $CI_PIPELINE_SOURCE
- echo $CPF
coverage_html:
stage: coverage_report
script:
- python coverage_test.py
- mkdir -p public/coverage_report
- mv coverage_report public/coverage_report
artifacts:
paths:
- public
expire_in: 15 days
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: always
relatorio:
stage: relatorio
script:
- python ./ir.py --do check_environment_variables
- python ./ir.py --do busca_trades_e_faz_merge_operacoes
- python ./ir.py --do calculo_ir
retry: 2