-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
31 lines (29 loc) · 954 Bytes
/
.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
default:
image: ${CI_REGISTRY}/devops/images/usgs/python:3.9
before_script:
- bash install.sh 1
- source ~/miniforge3/etc/profile.d/conda.sh
- conda activate lsforce
- mamba install --channel conda-forge --yes gcc gfortran make binutils # TODO: CI-specific, or?
- bash install-cps.sh
- export PATH=~/PROGRAMS.330/bin/:$PATH # Add CPS to path
Check formatting and run tests:
script:
- black --check . # Black formatting check
- isort --check-only . # isort formatting check
- pytest --cov-report xml:coverage.xml # Run tests
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
pages:
script:
- pushd doc/
- make html
- popd
- mv doc/_build/html/ public/
artifacts:
paths:
- public # The folder that contains the files to be exposed at the Page URL