config.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Use the latest 2.1 version of CircleCI pipeline process engine.
  2. # See: https://circleci.com/docs/2.0/configuration-reference
  3. version: 2.1
  4. # Create the orb for the code coverage upload
  5. orbs:
  6. codecov: codecov/codecov@3.2.2
  7. # Define a job to be invoked later in a workflow.
  8. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
  9. jobs:
  10. azure-storage:
  11. # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
  12. # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
  13. docker:
  14. - image: ubuntu:20.04
  15. # Add steps to the job
  16. # See: https://circleci.com/docs/2.0/configuration-reference/#steps
  17. steps:
  18. - checkout
  19. - run:
  20. name: Setup Environment and Run Tests
  21. command: |
  22. apt update
  23. apt install -y wget coreutils curl gnupg
  24. wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh;
  25. bash $HOME/miniconda.sh -b -p $HOME/miniconda
  26. export PATH="$HOME/miniconda/bin:$PATH"
  27. conda config --set always_yes yes --set changeps1 no
  28. conda update -y conda
  29. conda config --add channels conda-forge
  30. conda create -n azure_storage python=3.8.5
  31. source activate azure_storage
  32. conda install -c olcbioinformatics azure_storage
  33. mkdir /invalid
  34. chmod -R 000 /invalid
  35. python -m pytest tests/ --cov=azure_storage --cov-config=.coveragec --cov-report=xml:test_reports/azure_storage.xml
  36. - store_artifacts:
  37. path: test_reports/
  38. destination: circleci-docs
  39. - codecov/upload:
  40. file: /root/project/test_reports/azure_storage.xml
  41. xtra_args: -R /root/project/
  42. workflows:
  43. build_and_test:
  44. jobs:
  45. - azure-storage:
  46. filters:
  47. branches:
  48. ignore: gh-pages