- name: cppcheck
  commands: |
    export PATH=/opt/toolchain-v1/bin:$PATH
    export LD_LIBRARY_PATH=/opt/toolchain-v1/lib:/opt/toolchain-v1/lib64
    TIMEOUT=2400 ./cppcheck
  infiles:
    - cppcheck # cppcheck script
    - ../../src # src source dir
    - ../../tests # tests source dir
    - ../../poc # poc source dir
    - ../../.git # git directory (used to find out changed files in commit)
    - ../../.clang-format # clang-format config file
  outfile_paths:
    - \./memgraph/tools/apollo/\.cppcheck_errors

- name: code_coverage
  project: ^NEVER$ # TODO (mferencevic): remove when the coverage is split into two (single node and distributed)
  type: data process
  require_runs: ^unit__.+ # regex to match all unit runs
  commands: |
    export PATH=/opt/toolchain-v1/bin:$PATH
    export LD_LIBRARY_PATH=/opt/toolchain-v1/lib:/opt/toolchain-v1/lib64
    TIMEOUT=300 ./coverage_convert
  infiles:
    - coverage_convert # coverage_convert script
    - coverage_parse_export # coverage_parse_export script
    - apollo_archives.yaml # coverage archive export config
    - ../../src # src source dir
  outfile_paths:
    - \./memgraph/tools/apollo/generated/\.coverage_summary
    - \./memgraph/tools/apollo/generated/\coverage.json