From 89a7acb13057a4a5124ef0c425be533193f9159b Mon Sep 17 00:00:00 2001 From: iuvbio Date: Fri, 20 Aug 2021 19:43:23 +0200 Subject: [PATCH] add lint and test workflow --- .github/workflows/lint_and_test.yml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/lint_and_test.yml diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml new file mode 100644 index 0000000..4cad3e0 --- /dev/null +++ b/.github/workflows/lint_and_test.yml @@ -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/