Skip to content

Implement MVP version for positional search #18

Implement MVP version for positional search

Implement MVP version for positional search #18

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with Python 3.11
name: Python pytest, coverage, and flake8 linting
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo apt-get install -y libgles2-mesa-dev libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
pip install pipenv
pipenv install --deploy --dev
pipenv run pip list
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
pipenv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=150 --statistics
- name: Test with pytest
run: |
xvfb-run pipenv run coverage run --branch --omit '*test*,*__init__.py' -m pytest
pipenv run coverage xml
- name: Python coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: 0.9
thresholdNew: 0.9
thresholdModified: 0.9
if: github.event_name == 'pull_request'