mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-08 02:24:23 -05:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Python package
|
|
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
python-version: [3.7, 3.8]
|
|
os: [ubuntu-latest, macOS-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Setup Python environment
|
|
uses: actions/setup-python@v1.1.1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
brew update && brew install gmp boost || echo ""
|
|
sh install.sh
|
|
- name: Test proof of space
|
|
run: |
|
|
cd lib/chiapos
|
|
mkdir -p build && cd build
|
|
cmake ../
|
|
cmake --build . -- -j 6
|
|
./RunTests
|
|
cd ../../../
|
|
- name: Test vdf
|
|
run: |
|
|
. .venv/bin/activate
|
|
cd lib/chiavdf/fast_vdf
|
|
python python_bindings/test_verifier.py
|
|
cd ../../../
|
|
- name: Lint source with flake8
|
|
run: |
|
|
./.venv/bin/flake8 src --exclude src/wallet
|
|
- name: Lint source with mypy
|
|
run: |
|
|
./.venv/bin/mypy src tests
|
|
- name: Test blockchain code with pytest
|
|
run: |
|
|
./.venv/bin/py.test tests -s -v
|
|
|