Skip to content

Commit

Permalink
improve pylint workflow, add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mmgen committed Nov 11, 2023
1 parent eb830e2 commit 01783f6
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/build-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
wheel
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on:
push:
paths:
- '.github/workflows/build.yaml'
- '**.py'

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.9","3.10","3.11"]

steps:
- uses: actions/checkout@v4

- name: Cache libsecp256k1 repository
id: cache-libsecp256k1
uses: actions/cache@v3
env:
cache-name: cache-libsecp256k1
with:
path: ~/.cache/mmgen/secp256k1
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
.github/build-requirements.txt
setup.cfg
- name: Build and install MMGen Wallet
run: |
python3 -m pip install build wheel
python3 -m build --no-isolation
python3 -m pip install --user --break-system-packages dist/*.whl
23 changes: 17 additions & 6 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Pylint
name: pylint

on: push
on:
push:
paths:
- '.github/workflows/pylint.yaml'
- '**.py'

jobs:
test:
Expand All @@ -11,22 +15,29 @@ jobs:
python-version: ["3.9","3.10","3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
setup.cfg
eth-requirements.txt
xmr-requirements.txt
test-requirements.txt
- name: Install Python dependencies
run: |
python3 -m pip install gmpy2 cryptography pynacl ecdsa aiohttp requests pexpect scrypt semantic-version
python3 -m pip install pycryptodomex pysocks pycoin ipaddress varint pylint
python3 -m pip install --no-deps py_ecc==1.6.0 mypy_extensions==0.4.1 monero
- name: Check the code with pylint static code analyzer
- name: Check the code with Pylint static code analyzer
env:
PYTHONPATH: .
run: |
export PYTHONPATH=.
pylint --errors-only mmgen
pylint --errors-only test
pylint --errors-only --disable=relative-beyond-top-level test/cmdtest_py_d
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

##### An online/offline cryptocurrency wallet for the command line

![Pylint](https://github.com/mmgen/mmgen/workflows/Pylint/badge.svg)
![build](https://github.com/mmgen/mmgen/workflows/build/badge.svg)
![pylint](https://github.com/mmgen/mmgen/workflows/pylint/badge.svg)

### Description

Expand Down
2 changes: 1 addition & 1 deletion mmgen/data/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0.dev14
14.0.dev15
3 changes: 3 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pycoin
monero
pylint

0 comments on commit 01783f6

Please sign in to comment.