update docs #106
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: testcov workflow | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
name: Test python API | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7.10' | |
cache: 'pip' # caching pip dependencies | |
- run: pip install -r requirements.txt | |
- name: Install Pytest | |
run: pip install pytest-cov | |
- name: Install requirements | |
run: pip install -r requirements.txt | |
- name: Run tests and collect coverage | |
run: pytest --cov=./ --cov-report=xml | |
- name: Upload coverage reports to Codecov with GitHub Action | |
uses: codecov/codecov-action@v3 | |
# Replace `linux` below with the appropriate OS | |
# Options are `alpine`, `linux`, `macos`, `windows` | |
- name: Report in Github | |
run: | | |
curl -Os https://uploader.codecov.io/latest/linux/codecov | |
chmod +x codecov | |
./codecov -t ${CODECOV_TOKEN} |