test: fixing py tests #28
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: DB12 testing | |
on: [push, pull_request] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Run pre-commit | |
run: pre-commit run --all-files --show-diff-on-failure | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: False | |
matrix: | |
python_version: | |
- 2.7 | |
- 3.6 | |
- 3.9 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: prepare environment | |
run: | | |
conda config --set add_pip_as_python_dependency false | |
conda create -c conda-forge -c free -n python_${{ matrix.python_version }} python=${{ matrix.python_version }} | |
- name: Run pylint | |
run: | | |
. "${CONDA}/bin/activate" db12 | |
pylint -E src/db12/ tests/ | |
- name: Run pytest | |
run: | | |
. "${CONDA}/bin/activate" db12 | |
pytest tests |