Skip to content

Commit fa34e73

Browse files
authored
Merge pull request #340 from f321x/ci_github_actions
ci: move from Cirrus to Github Actions
2 parents 66acbbf + 1ea1793 commit fa34e73

5 files changed

Lines changed: 113 additions & 89 deletions

File tree

.cirrus.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch: # https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
# if a PR gets force pushed, cancel the current run and run the new one
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
15+
jobs:
16+
unittests:
17+
name: unittests
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- name: Install system packages
24+
run: |
25+
sudo apt-get -qq update
26+
sudo apt-get install -yq libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev librocksdb-dev libleveldb-dev libboost-all-dev libsodium-dev
27+
28+
- uses: actions/setup-python@v6
29+
with:
30+
python-version: '3.14'
31+
cache: 'pip'
32+
cache-dependency-path: 'pyproject.toml'
33+
34+
- name: Log Python version and Git tag
35+
run: |
36+
python3 --version
37+
git tag
38+
39+
- name: Install Python deps
40+
run: |
41+
# test framework -related deps
42+
pip install pycodestyle
43+
pip install pytest-asyncio
44+
pip install pytest-cov
45+
pip install Sphinx
46+
# hacks for rocksdb
47+
pip install 'Cython<3.0'
48+
pip install git+https://github.com/jansegre/python-rocksdb.git@314572c02e7204464a5c3e3475c79d57870a9a03
49+
# e-x itself
50+
pip install .
51+
# hashes and other altcoin-specific stuff
52+
pip install tribushashm
53+
pip install blake256
54+
pip install dash_hash
55+
pip install git+https://github.com/bitcoinplusorg/x13-hash
56+
pip install xevan_hash
57+
pip install quark_hash
58+
pip install groestlcoin_hash
59+
pip install x16r_hash
60+
pip install pycryptodomex
61+
pip install git+https://github.com/Electra-project/nist5_hash
62+
pip install x16rv2_hash
63+
64+
- name: Run pytest
65+
run: pytest --cov=electrumx
66+
67+
pycodestyle:
68+
name: pycodestyle
69+
runs-on: ubuntu-24.04
70+
steps:
71+
- uses: actions/checkout@v6
72+
73+
- uses: actions/setup-python@v6
74+
with:
75+
python-version: '3.14'
76+
cache: 'pip'
77+
78+
- name: Install pycodestyle
79+
run: pip install pycodestyle
80+
81+
- name: Run pycodestyle
82+
run: pycodestyle --max-line-length=100 src
83+
84+
build_docs:
85+
# note: this build task is not related to read-the-docs; it is only here to sanity-check the docs can be built.
86+
# For the read-the-docs build, see .readthedocs.yml
87+
# and the webhook set up in https://github.com/spesmilo/electrumx/settings/hooks
88+
name: build_docs
89+
runs-on: ubuntu-24.04
90+
env:
91+
LC_ALL: "C"
92+
steps:
93+
- uses: actions/checkout@v6
94+
95+
- uses: actions/setup-python@v6
96+
with:
97+
python-version: '3.14'
98+
cache: 'pip'
99+
cache-dependency-path: 'docs/requirements-docs.txt'
100+
101+
- name: Install docs deps
102+
run: pip install -r docs/requirements-docs.txt
103+
104+
- name: Build docs
105+
run: |
106+
cd docs
107+
make html

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ Language: Python (>= 3.10)
88
```
99

1010
[![Latest PyPI package](https://badge.fury.io/py/e_x.svg)](https://pypi.org/project/e-x/)
11-
[![Build Status](https://api.cirrus-ci.com/github/spesmilo/electrumx.svg?branch=master)](https://cirrus-ci.com/github/spesmilo/electrumx)
12-
[![Test coverage statistics](https://coveralls.io/repos/github/spesmilo/electrumx/badge.svg?branch=master)](https://coveralls.io/github/spesmilo/electrumx)
11+
[![Build Status](https://github.com/spesmilo/electrumx/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/spesmilo/electrumx/actions/workflows/ci.yml)
1312

1413
This project is a fork of [kyuupichan/electrumx](https://github.com/kyuupichan/electrumx).
1514
The original author dropped support for Bitcoin, which we intend to keep.

docs/index.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
ElectrumX
33
=========
44

5-
.. image:: https://api.cirrus-ci.com/github/spesmilo/electrumx.svg?branch=master
6-
:target: https://cirrus-ci.com/github/spesmilo/electrumx
7-
.. image:: https://coveralls.io/repos/github/spesmilo/electrumx/badge.svg
8-
:target: https://coveralls.io/github/spesmilo/electrumx
5+
.. image:: https://github.com/spesmilo/electrumx/actions/workflows/ci.yml/badge.svg?branch=master
6+
:target: https://github.com/spesmilo/electrumx/actions/workflows/ci.yml
97

108
This project is a fork of `kyuupichan/electrumx <https://github.com/kyuupichan/electrumx>`_.
119
The original author dropped support for Bitcoin, which we intend to keep.
@@ -22,8 +20,8 @@ Source Code
2220
===========
2321

2422
The project is hosted on `GitHub
25-
<https://github.com/spesmilo/electrumx/>`_. and uses `Cirrus CI
26-
<https://cirrus-ci.com/github/spesmilo/electrumx>`_ for Continuous
23+
<https://github.com/spesmilo/electrumx/>`_. and uses `GitHub Actions
24+
<https://github.com/spesmilo/electrumx/actions>`_ for Continuous
2725
Integration.
2826

2927
Please submit an issue on the `bug tracker

tests/server/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from aiorpcx import RPCError
55
from electrumx import Controller, Env
66

7-
loop = asyncio.get_event_loop()
7+
loop = asyncio.new_event_loop()
88

99

1010
def set_env():

0 commit comments

Comments
 (0)