filippocastelli/KEGGutils

CircleCI failing even if tests are ok

filippocastelli opened this issue · 1 comments

I'm trying to add OK notebook execution testing as a condition ci PASSED status, documentation notebooks intentionally produce errors right now to test if CircleCI can catch them.

new CircleCI configuration should now correctly handle notebook execution:

version: 2 jobs: build: docker: - image: circleci/python:3.6.7 working_directory: ~/KEGGutils

steps:
  # Step 1: obtain repo from GitHub
  - checkout
  # Step 2: create virtual env and install dependencies
  - run:
      name: install dependencies
      command: |
        python3 -m venv venv
        . venv/bin/activate
        pip install -r requirements.txt
  # Step 3: run linter and tests
  - run:
      name: run tests
      command: |
        . venv/bin/activate
        pytest -v --cov
  # Step 4: test if notebook work
  - run:
      name: run notebooks
      command: |
        . venv/bin/activate
        cd examples
        for f in *.ipynb; do jupyter-nbconvert --to notebook --execute "$f"; done`