Continuous Integration

  1. Create a branch called ci
  2. Create the 2 files ci/calculator.py and ci/test_calculator.py.
  3. Build a Gitlab-CI with 2 stages:
    • Static analysis, with 3 jobs (linting, formating, type-checking)
      • The type checking job should enforce type hints and be allowed to fail!
    • Testing (use pytest) - ensure job output shows which ones are executed.
      • Use pytest-cov and make use of coverage1 and artifacts keywords so that one can see the generated html report.
  4. Open a merge request and set lecturer (Manuel Reis) as the reviewer.
Important

⚠️ You need to enable CI/CD in Settings→General→“Visibility, project features, permissions” and enable instance runners under Settings→CI/CD→Runners.