-
Notifications
You must be signed in to change notification settings - Fork 43
/
.razorops.yaml
37 lines (35 loc) · 1.12 KB
/
.razorops.yaml
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
tasks:
check-vulvs:
runner: razorci/python:3.9
steps:
- checkout
## use https://github.com/pypa/advisory-database for security vulnerabilities
- commands:
- export PATH="$(python3 -m site --user-base)/bin:$PATH"
- python3 -m pip install pip-audit
- pip-audit -r requirements.txt --aliases --desc -f json | python3 -m json.tool
### use pipenv inbuilt checks (PyUp Safety security vulnerabilities)
- commands:
- pipenv sync
- pipenv check -i 70612
unit-tests:
runner: razorci/python:3.9
steps:
- checkout
## restore cache for faster builds
- cache/pull: pip-deps-{{ checksum "requirements.txt" }}
- commands:
- pip install -r requirements.txt --user
- commands:
- python test.py
- export PATH="$(python3 -m site --user-base)/bin:$PATH"
# generate coverage reports
- coverage run test.py
- coverage report && coverage html
- cache/push:
key: pip-deps-{{ checksum "requirements.txt" }}
paths:
- ~/.cache/pip
- reports/junit: test-reports/*.xml
- reports/html:
dir: htmlcov