Revert "Revert "add error handling for pre-existing DB objects"" #36
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: GerryDB client tests | |
on: [push, pull_request] | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11'] | |
os: [ubuntu-latest, macos-latest] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python | |
uses: actions/setup-python@master | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
pip install . | |
pip install black isort | |
- name: Check formatting | |
run: | | |
python -m black . --check | |
python -m isort . --diff | |
- name: Run tests and generate coverage report | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pytest -v --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: . | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
verbose: true |