fix #1663; refactor/breakout LMDB & XBR; cleanups & make CI work agai… #620
This file contains hidden or 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
name: main | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OS package dependencies | |
run: | | |
sudo apt update | |
sudo apt install libenchant-2-dev libbz2-dev libsnappy-dev libunwind-dev libgirepository1.0-dev | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.12' | |
architecture: 'x64' | |
- name: Install Python package dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Run Flake8 | |
run: tox -c tox.ini -e flake8 | |
test: | |
env: | |
CB_FULLTESTS: 1 | |
# Test on Ubuntu, MacOS, Windows using CPython and PyPy | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
# os: [ubuntu-latest, macos-latest, windows-latest] | |
# python 3.11 fails with "src/twisted/test/raiser.c:198:12: fatal error: longintrepr.h: No such file or directory" | |
# twisted doesn't yet support 3.11 formally: https://github.com/twisted/twisted/blob/trunk/pyproject.toml#L24 | |
python-version: ['3.10', '3.12', 'pypy-3.10'] | |
framework: ['asyncio', 'tw2403', 'twtrunk'] | |
# https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/ | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error | |
continue-on-error: false | |
steps: | |
# Checkout sources | |
- uses: actions/checkout@v3 | |
# Install OS packages, as we install Python packages from source: | |
# | |
# libenchant-dev needed for pyenchant, needed for sphinx-spellcheck | |
# libbz2-dev, libsnappy-dev needed for compression | |
# libunwind-dev needed for vmprof | |
# | |
- name: Install OS package dependencies | |
run: | | |
sudo apt update | |
sudo apt install build-essential cargo-1.81 libssl-dev libffi-dev libunwind-dev \ | |
libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \ | |
libsnappy-dev libcairo2-dev libgirepository-2.0-dev \ | |
build-essential python3-dev pypy3-dev libffi-dev | |
# Use this Python | |
# https://github.com/actions/setup-python/blob/main/README.md | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python package dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -U -r requirements-dev.txt | |
- name: Install this package | |
run: | | |
pip install .[all] | |
- name: Prechecks | |
run: | | |
python -c "import autobahn; print(autobahn.__version__)" | |
python -c "from autobahn.testutil import FakeTransport; print(FakeTransport)" | |
- name: Run unit tests (PyTest) | |
run: | | |
tox -c tox.ini -e ${{ matrix.framework }} | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install OS package dependencies | |
run: | | |
sudo apt update | |
sudo apt install libenchant-2-dev libbz2-dev libsnappy-dev libunwind-dev libcairo2-dev libgirepository-2.0-dev | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.12' | |
architecture: 'x64' | |
- name: Install Python package dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Install this package and run Sphinx | |
run: | | |
pip install .[all] | |
tox -c tox.ini -e sphinx |