Separate github action into separete workflow files

This commit is contained in:
Mark Schmitt
2021-01-08 11:33:08 +01:00
parent 42064df3e0
commit 968725f09f
4 changed files with 91 additions and 78 deletions

43
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: backend-tests
# always run tests workflow
on: push
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python:
- 3.6.8
- 3.7.9
- 3.8.6
steps:
- uses: actions/checkout@v2
- name: Install python version
uses: gabrielfalcao/pyenv-action@v7
with:
default: "${{ matrix.python }}"
command: "pip install -U pip"
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Persistent Github pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip${{ matrix.python }}
- name: Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get update -qq
sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr imagemagick ghostscript optipng
pip install --upgrade pipenv
pipenv install --system --dev
cd src/
pipenv run pytest --cov
pipenv run pycodestyle
pipenv run coveralls