Merge pull request #20 from datasciencecampus/feature/report #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CodeCov | |
on: | |
pull_request: | |
branches: '**' | |
push: | |
branches: 'main' | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
env: | |
OS: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
cache: 'pip' # caching pip dependencies | |
- name: Install packages | |
run: | | |
pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz | |
python -m nltk.downloader punkt stopwords | |
pip install coverage | |
pip install coverage[toml] | |
- name: Run Unit Tests | |
run: | | |
coverage run -m pytest | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true |