#!/bin/sh1# To run using ZSH: zsh -i ./codecov_push.sh2# To run using bash: bash -i ./codecov_push.sh34# We do test on Python 3.11 (latest Python version)56# Create a new Python env for Deepparse tests and activate it7conda create --name deepparse_pytest_3_11 python=3.11 -y --force8conda activate deepparse_pytest_3_11910# Install dependencies11pip install -Ur tests/requirements.txt12pip install -Ur requirements.txt1314# Run pytest from conda env15echo "*****Running test in Conda*****"16# --live-stream is to remove the Conda capture of the stream17conda run -n deepparse_pytest_3_11 --live-stream pytest --cov ./deepparse --cov-report html --cov-report xml --cov-config=.coveragerc1819# Push the coverage file20./codecov -f coverage.xml -n unittest-integrationtest -t $CODECOVKEYDEEPPARSE2122# close conda env23conda deactivate2425conda env remove -n deepparse_pytest_3_11262728