-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
105 lines (93 loc) · 2.8 KB
/
.cirrus.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
---
# https://cirrus-ci.org/guide/writing-tasks/
# https://cirrus-ci.org/examples/
container:
cpu: 1
memory: "2G"
lint_markdown_task:
name: "Lint Markdown (markdownlint)"
container:
image: "docker.io/library/node:alpine3.16"
install_script: "npm install -g markdownlint-cli"
lint_script: "markdownlint *.md docs/*.md"
lint_yaml_task:
name: "Lint YAML (yamllint)"
container:
image: "docker.io/pipelinecomponents/yamllint:0.20.6"
script: "yamllint ."
lint_python_task:
name: "Lint Python (flake8)"
container:
image: "docker.io/alpine/flake8:5.0.4"
lint_script: "flake8"
format_python_task:
name: "Format Python (black)"
container:
image: "docker.io/pipelinecomponents/black:0.14.1"
script: "black ."
sort_python_deps_task:
name: "Sort Python Deps (isort)"
container:
image: "docker.io/library/python:3.9-alpine"
install_script: "pip install isort"
script: "isort ."
check_python_docstring_task:
name: "Check Python docstrings (interrogate)"
container:
image: "docker.io/library/python:3.9-alpine"
install_script: "pip install interrogate"
script: "interrogate -v"
# format_python_in_doc_task:
# name: "Format Python in doc (blacken-docs)"
# container:
# image: "docker.io/library/python:3.9-alpine"
# install_script: "pip install blacken-docs"
# script: "blacken-docs"
# type_python_task:
# name: "Type Python (mypy)"
# container:
# image: "docker.io/library/python:3.9-alpine"
# install_script: "pip install mypy"
# script: "mypy ."
lint_containerfile_task:
name: "Lint Containerfile (hadolint)"
container:
image: "docker.io/hadolint/hadolint:latest-alpine"
test_script: "hadolint Dockerfile"
scan_containerfile_task:
name: "Scan Containerfile (trivy)"
container:
image: "docker.io/aquasec/trivy:0.31.3"
scan_script: "trivy config
--severity CRITICAL
--exit-code 1
Dockerfile"
# pytest_task:
# name:
# "Test App"
# container:
# image: "docker.io/library/python:3.9-slim"
# only_if:
# "$CIRRUS_ENVIRONMENT != 'CLI'"
# env:
# PIP_CACHE: "${HOME}/.cache/pip"
# REQS_PATH: "./requirements"
# pip_cache:
# folder: "${PIP_CACHE}"
# # reupload_on_changes: "false" # since there is a fingerprint script
# # fingerprint_script:
# # - "echo ${CIRRUS_OS}"
# # - "python --version"
# # # - "cat ${REQS_FILE}"
# populate_script:
# # - "python3 -m pip install -r ${REQS_FILE}"
# - "python3 -m pip install --no-cache-dir --user
# -r ${REQS_PATH}/app-reqs.txt
# -r ${REQS_PATH}/test-reqs.txt
# -r ${REQS_PATH}/mlds-reqs.txt
# -r ${REQS_PATH}/hf-reqs.txt
# -r ${REQS_PATH}/torch-reqs.txt"
# test_script:
# # - "coverage run python3 -m pytest"
# - "python3 -m pytest"
...