mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-09 02:24:26 -05:00
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: Python package
|
|
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on:
|
|
- ubuntu-latest
|
|
- macOS-latest
|
|
strategy:
|
|
max-parallel: 4
|
|
matrix:
|
|
python-version: [3.7, 3.8]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
env:
|
|
CHIA_MACHINE_SSH_KEY: ${{ secrets.CHIA_MACHINE_SSH_KEY }}
|
|
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
|
|
run: |
|
|
eval "$(ssh-agent -s)"
|
|
ssh-add - <<< "${CHIA_MACHINE_SSH_KEY}"
|
|
git submodule update --init --recursive
|
|
python3 -m venv .venv
|
|
. .venv/bin/activate
|
|
pip install wheel # For building blspy
|
|
pip install -e .
|
|
pip install -r requirements.txt
|
|
- name: Lint with flake8
|
|
run: |
|
|
flake8 src
|
|
- name: Lint with mypy
|
|
run: |
|
|
mypy src tests
|
|
- name: Test with pytest
|
|
run: |
|
|
py.test tests -s -v
|
|
|