add lint and test workflow

This commit is contained in:
iuvbio 2021-08-20 19:43:23 +02:00
parent c39fe4f599
commit 89a7acb130
1 changed files with 31 additions and 0 deletions

31
.github/workflows/lint_and_test.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Lint and test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with black
run: |
# stop the build if there are Python syntax errors or undefined names
black --check pandas_ods_reader/
- name: Test with pytest
run: |
pytest tests/