name: CI on: push: branches: [master] pull_request: branches: [master] workflow_dispatch: # https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow concurrency: group: ${{ github.workflow }}-${{ github.ref }} # if a PR gets force pushed, cancel the current run and run the new one cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: unittests: name: unittests runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v6 - name: Install system packages run: | sudo apt-get -qq update sudo apt-get install -yq libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev librocksdb-dev libleveldb-dev libboost-all-dev libsodium-dev - uses: actions/setup-python@v6 with: python-version: '3.14' cache: 'pip' cache-dependency-path: 'pyproject.toml' - name: Log Python version and Git tag run: | python3 --version git tag - name: Install Python deps run: | # test framework -related deps pip install pycodestyle pip install pytest-asyncio pip install pytest-cov pip install Sphinx # e-x itself # - install both leveldb and rocksdb bindings pip install ".[leveldb,rocksdb]" - name: Run pytest run: pytest --cov=electrumx pycodestyle: name: pycodestyle runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: '3.14' cache: 'pip' - name: Install pycodestyle run: pip install pycodestyle - name: Run pycodestyle run: | pycodestyle \ --max-line-length=140 \ src build_docs: # note: this build task is not related to read-the-docs; it is only here to sanity-check the docs can be built. # For the read-the-docs build, see .readthedocs.yml # and the webhook set up in https://github.com/spesmilo/electrumx/settings/hooks name: build_docs runs-on: ubuntu-24.04 env: LC_ALL: "C" steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: '3.14' cache: 'pip' cache-dependency-path: 'docs/requirements-docs.txt' - name: Install docs deps run: pip install -r docs/requirements-docs.txt - name: Build docs run: | cd docs make html