File tree 4 files changed +8
-11
lines changed
docs/book/src/development 4 files changed +8
-11
lines changed Original file line number Diff line number Diff line change
1
+ # Nektos act runs tests as root. Without this environment variable
2
+ # being set, CAPE exits at line 10 of web/web/settings.py,
3
+ # and no tests are run.
4
+
5
+ --env CAPE_AS_ROOT=1
Original file line number Diff line number Diff line change 40
40
run : poetry run ruff . --line-length 132 --ignore E501,E402
41
41
42
42
- name : Run unit tests
43
- # Nektos act runs tests as root;
44
- # and failing from line 10 on web/web/settings.py
45
- env :
46
- CAPE_AS_ROOT : 1
47
43
run : poetry run python -m pytest --import-mode=append
48
44
49
45
- name : See if any parser changed
Original file line number Diff line number Diff line change 33
33
bash -c "poetry run ./extra/yara_installer.sh"
34
34
35
35
- name : Run unit tests
36
- # Nektos act runs tests as root;
37
- # and failing from line 10 on web/web/settings.py
38
- env :
39
- CAPE_AS_ROOT : 1
40
36
run : poetry run pytest tests/test_yara.py -s --import-mode=append
Original file line number Diff line number Diff line change @@ -198,11 +198,8 @@ save it as an input file.
198
198
Example::
199
199
200
200
{
201
- "action": "push",
202
201
"act": true,
203
202
"repository" : {
204
- "id": 1,
205
- "full_name": "CAPEv2",
206
203
"default_branch": "master"
207
204
}
208
205
}
@@ -215,6 +212,9 @@ and to run the actions that are scheduled::
215
212
216
213
gh act schedule -s GITHUB_TOKEN="$(gh auth token)" --eventpath /tmp/github-event.json
217
214
215
+ We created a file ``.actrc `` containing ``--env CAPE_AS_ROOT=1 `` because ``act `` runs the tests
216
+ as root, and otherwise the tests would exit saying you cannot run CAPE as root.
217
+
218
218
Poetry and pre-commit hooks
219
219
===========================
220
220
You can’t perform that action at this time.
0 commit comments