4.6. CI/CD Tests

4.6.1. Doctests

$ python3 -m doctest -v tests/*.py

4.6.2. Unit Tests

$ python3 -m unittest discover -v tests

4.6.3. Test Coverage

$ python3 -m coverage run game
$ python3 -m coverage xml -o .tmp/coverage.xml

4.6.4. Security Analysis

$ python3 -m bandit --format json --output=.tmp/bandit.json --recursive game

4.6.5. Types

$ python3 -m mypy --ignore-missing-imports game

4.6.6. Style

$ python3 -m flake8 --doctest --output-file=.tmp/flake8.txt

4.6.7. Lint

$ python3 -m pylint --output-format=parseable --output=.tmp/pylint.txt --disable=C0114,C0115,C0116,E0401,C0103 game
  • C0114 - missing-module-docstring

  • C0115 - missing-class-docstring

  • C0116 - missing-function-docstring

  • E0401 - import-error

  • C0103 - invalid-name (errors on x and y attribute names)