-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
38 lines (36 loc) · 1.19 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
stages:
- test
lint:
stage: test
image: python:3.8
before_script:
- pip install black
script:
- black --check .
allow_failure: false
testcov:
stage: test
image: python:3.8
before_script:
# cv2 fix
- apt-get update && apt-get install -y libgl1
- wget -q https://repo.continuum.io/miniconda/Miniconda3-py38_23.11.0-1-Linux-x86_64.sh -O miniconda.sh; bash miniconda.sh -b -f -p $HOME/miniconda;
# Ensure the (mini) conda environment can be activated.
- export PATH="$HOME/miniconda/bin:$PATH"
# (Re)create the environment.yml file for the repository.
- conda env create -q -f ./env/face_detection_age_from-history.yaml -n myenv --yes
- conda init bash
- source ~/.bashrc
- conda activate myenv
# install pytest, pytest-cov
- pip install pytest pytest-cov
script:
# run pytest-cov
- pytest . --cov --disable-pytest-warnings
## Download codecov
# https://docs.codecov.com/docs/codecov-uploader#download-as-a-binary
- curl -Os https://cli.codecov.io/v0.5.1/linux/codecov #https://cli.codecov.io/latest/linux/codecov
# Install codecov
- chmod +x codecov
# Upload to site
- ./codecov upload-process -t $CODECOV_TOKEN