-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathref-Github-action.yml
84 lines (77 loc) · 1.57 KB
/
ref-Github-action.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
stages:
- setup
- test
- build
- deploy
- doc
setup:
stage: setup
tags:
- ads::docker
script:
- python3 -m venv ../venv
- source ../venv/bin/activate
- python3 -m pip install --upgrade pip setuptools wheel
artifacts:
paths:
- venv
test:
stage: test
tags:
- ads::docker
before_script:
- source ../venv/bin/activate
- python3 -m pip install pytest netCDF4
- apt-get update && apt-get --assume-yes install netcdf-bin
script:
- python3 -m pytest
coverage:
stage: test
tags:
- ads::docker
before_script:
- pip install pytest-cov netCDF4
- apt-get update && apt-get --assume-yes install netcdf-bin
script:
- pytest --cov-report term --cov=netcdf_flattener
security:
stage: test
tags:
- ads::docker
before_script:
- pip install bandit
script:
- bandit -r . -b test/bandit_whitelisting.json
build_wheel:
stage: build
tags:
- ads::docker
before_script:
- source ../venv/bin/activate
script:
- python3 setup.py bdist_wheel
artifacts:
paths:
- dist/netcdf_flattener-*.whl
build_doc:
stage: doc
tags:
- ads::docker
before_script:
- source ../venv/bin/activate
- python3 -m pip install sphinx netCDF4
script:
- cd doc
- sphinx-build -b html . build
artifacts:
paths:
- doc/build/*
deploy:
stage: deploy
tags:
- ads::docker
before_script:
- source ../venv/bin/activate
script:
- python3 -m pip install --upgrade --force-reinstall dist/netcdf_flattener-*.whl
- python3 -c "import netcdf_flattener"