Merge branch 'wbolster:main' into CI #107
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: plyvel test | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: ${{ matrix.os }}-${{matrix.python-version}}-test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: [3.7, 3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Linux Dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get install libleveldb-dev libsnappy-dev | |
- name: Install MacOS Dependencies | |
if: runner.os == 'macOS' | |
run: brew install snappy leveldb | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Show Python arch | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
file `which python` | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
file `which python` | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Build and Install package | |
run: | | |
python setup.py install | |
- name: Run pytest | |
run: | | |
pytest test/test_plyvel.py |