Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/python-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Python Build Pipeline

on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install -U "flake8==5.0.4" "mypy==0.982" "numpy>=1.21.1" "scipy>=1.7.3" "mpmath==1.3.0" "pytest==7.2.0" "pytest-cov==4.0.0" "attrs==22.1.0" "hypothesis==6.58.0" "coveralls==3.3.1" "sphinx_rtd_theme==1.2.2" "sphinx<7.0.0"
pip install .

- name: Lint with flake8
run: flake8 petbox/dca

- name: Type-check with mypy
run: mypy petbox/dca

- name: Run tests with pytest
run: pytest --cov=petbox

- name: Build documentation with Sphinx
run: sphinx-build -W -b html docs docs/_build/html

- name: Upload coverage to Coveralls
if: success()
run: coveralls