v1.7.6: add a load_content option for some workflows where being able… #582
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: Testing and automated code coverage | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- 'archivy/**' | |
- 'tests/**' | |
- '.github/workflows/codecov.yml' | |
- 'requirements.txt' | |
- 'requirements-tests.txt' | |
pull_request: | |
paths: | |
- 'archivy/**' | |
- 'tests/**' | |
- '.github/workflows/codecov.yml' | |
- 'requirements.txt' | |
- 'requirements-tests.txt' | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
env: | |
PYTHON: '3.9' | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.9 | |
- name: Generate coverage report | |
run: | | |
sudo apt-get install ripgrep | |
pip install -r requirements-tests.txt | |
pip install . | |
pip install tests/test_plugin | |
pytest --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
file: ./coverage.xml | |
files: ./coverage1.xml,./coverage2.xml | |
directory: ./coverage/reports/ | |
env_vars: PYTHON | |
fail_ci_if_error: true |