From 0c86cb507ab674297efd9fe63b25b32f6e159305 Mon Sep 17 00:00:00 2001 From: Harnoor Singh Date: Sun, 18 Aug 2024 17:51:39 -0230 Subject: [PATCH 1/5] Created sample python-build.yaml --- .github/workflows/python-build.yaml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/python-build.yaml diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml new file mode 100644 index 0000000..d870b56 --- /dev/null +++ b/.github/workflows/python-build.yaml @@ -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<7.0.0 sphinx_rtd_theme==1.2.2 + 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 From 0084e7779dd5e679f2baf03e0a310fc62bc91da8 Mon Sep 17 00:00:00 2001 From: Harnoor Singh Date: Sun, 18 Aug 2024 18:00:38 -0230 Subject: [PATCH 2/5] Updated python-build.yaml --- .github/workflows/python-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml index d870b56..9d048bf 100644 --- a/.github/workflows/python-build.yaml +++ b/.github/workflows/python-build.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - python-version: [3.8, 3.9, 3.10] + python-version: ['3.8', '3.9', '3.10'] steps: - name: Checkout code From aeeed6ba622a8d9b8c56b0a9c1f476ce1db40e08 Mon Sep 17 00:00:00 2001 From: Harnoor Singh Date: Sun, 18 Aug 2024 19:18:47 -0230 Subject: [PATCH 3/5] Updated python-build.yaml --- .github/workflows/python-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml index 9d048bf..f58f6e8 100644 --- a/.github/workflows/python-build.yaml +++ b/.github/workflows/python-build.yaml @@ -25,7 +25,7 @@ jobs: - 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<7.0.0 sphinx_rtd_theme==1.2.2 + 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<'7.0.0' sphinx_rtd_theme==1.2.2 pip install . - name: Lint with flake8 From ea29946394b8ccab0cf3ee760b8d674fa09ab86b Mon Sep 17 00:00:00 2001 From: Harnoor Singh Date: Sun, 18 Aug 2024 19:33:39 -0230 Subject: [PATCH 4/5] Updated python-build.yaml --- .github/workflows/python-build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml index f58f6e8..0c119d6 100644 --- a/.github/workflows/python-build.yaml +++ b/.github/workflows/python-build.yaml @@ -25,7 +25,9 @@ jobs: - 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<'7.0.0' sphinx_rtd_theme==1.2.2 + 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 From a858f7cccc05442a33583b75ac327532d258ad08 Mon Sep 17 00:00:00 2001 From: Harnoor Singh Date: Sun, 18 Aug 2024 19:36:25 -0230 Subject: [PATCH 5/5] Update python-build.yaml --- .github/workflows/python-build.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml index 0c119d6..6a85727 100644 --- a/.github/workflows/python-build.yaml +++ b/.github/workflows/python-build.yaml @@ -25,9 +25,7 @@ jobs: - 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 -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