add lint and test workflow
This commit is contained in:
parent
c39fe4f599
commit
89a7acb130
|
|
@ -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/
|
||||
Loading…
Reference in New Issue