Merge pull request #273 from pehrsoderman/bump-java-version #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python tests | |
on: | |
push: | |
branches: [ "master", "develop" ] | |
pull_request: | |
branches: [ "master", "develop" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["pypy3.10", "3.10"] # Arbitrary pick of one pypy and one Cpython version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install apt packages (for debbuild) | |
run: sudo apt-get install debhelper dh-python python3-pytest libboost-regex-dev | |
shell: bash | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
# Exclude examples as there is some python2 code there | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude examples/ | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude examples/ | |
- name: Build debian packages | |
run: make builddeb | |
- name: Test with pytest | |
run: pytest |