File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 - name : Run Codemodder
3939 run : codemodder --output output.codetf pygoat
4040 - name : Check PyGoat Findings
41- run : pytest -v ci_tests/test_webgoat_findings.py
41+ run : make webgoat-test
Original file line number Diff line number Diff line change 3333 - name : Black Format Check
3434 run : black --check .
3535 - name : Run pylint
36- run : pylint codemodder/ tests/ integration_tests/ -v
36+ run : make lint
3737
3838 complexity :
3939 name : Code Complexity
5050 run : |
5151 pip install -r requirements/complexity.txt
5252 - name : Run Radon
53- run : |
54- radon cc codemodder --min A --total-average
53+ run : make radon
5554 - name : Run Xenon
56- run : |
57- # threshold for pipeline to fail if we go below average, module, or block complexity
58- # https://github.com/rubik/xenon
59- xenon codemodder --max-average A --max-modules C --max-absolute C
55+ # threshold for pipeline to fail if we go below average, module, or block complexity
56+ # https://github.com/rubik/xenon
57+ run : make xenon
Original file line number Diff line number Diff line change 3434 - name : Install Dependencies
3535 run : pip install -r requirements/test.txt
3636 - name : Run unit tests
37- run : pytest -v --cov-fail-under=95 --cov=codemodder tests --numprocesses auto
37+ run : make test
3838 - name : Run integration tests
39- run : pytest -v integration_tests
39+ run : make integration-test
4040 - name : Upload coverage reports to Codecov
4141 uses : codecov/codecov-action@v3
4242 env :
Original file line number Diff line number Diff line change 1+ PYTEST = pytest -v
2+ COV_FLAGS = --cov-fail-under=95 --cov=codemodder
3+ XDIST_FLAGS = --numprocesses auto
4+
5+ test :
6+ ${PYTEST} ${COV_FLAGS} tests ${XDIST_FLAGS}
7+
8+ integration-test :
9+ ${PYTEST} integration_tests
10+
11+ webgoat-test :
12+ ${PYTEST} -v ci_tests/test_webgoat_findings.py
13+
14+ lint :
15+ pylint -v codemodder tests integration_tests
16+
17+ radon :
18+ radon cc codemodder --min A --total-average
19+
20+ # threshold for pipeline to fail if we go below average, module, or block complexity
21+ # https://github.com/rubik/xenon
22+ xenon :
23+ xenon codemodder --max-average A --max-modules C --max-absolute C
Original file line number Diff line number Diff line change @@ -23,3 +23,7 @@ codemodder = "codemodder.__main__:main"
2323
2424[tool .setuptools .package-data ]
2525"codemodder.codemods.semgrep" = [" src/codemodder/codemods/semgrep/*.yaml" ]
26+
27+ [tool .pytest .ini_options ]
28+ # Ignore integration tests and ci tests by default
29+ testpaths = [" tests" ]
You can’t perform that action at this time.
0 commit comments