#  Template python-build

#  This template allows you to validate your python code.
#  The workflow allows running tests and code linting on the default branch.

image: python:3.8

pipelines:
  default:
    - parallel:
      - step:
          name: Test
          caches:
            - pip
          script:
            - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
            - python compile_and_test_lib.py
            - pytest -v --junitxml=test-reports/report.xml
      #- step:
      #    name: Lint code
      #    script:
      #      # Enforce style consistency across Python projects https://flake8.pycqa.org/en/latest/manpage.html
      #      - pip install flake8
      #      - flake8 . --extend-exclude=dist,build --show-source --statistics
