Files
plm-electrumx/.github/workflows/ci.yml
T
davideandClaude Sonnet 5.5 0d1ebc6e3e CI: run on main, add a docker job, drop upstream-specific steps
The workflow only triggered on master. New job builds the image and runs
contrib/docker-smoke-test.sh, which checks the SSL handling of the entrypoint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-22 15:53:56 +02:00

107 lines
2.8 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
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
run: python3 --version
- 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
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
docker:
# builds the image and checks the SSL handling of its entrypoint (contrib/docker-smoke-test.sh)
name: docker
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Build image
run: docker build -t plm-electrumx .
- name: Smoke test
run: contrib/docker-smoke-test.sh plm-electrumx