Skip to content

Setup Poetry and Bumpversion #27

Setup Poetry and Bumpversion

Setup Poetry and Bumpversion #27

Workflow file for this run

name: Test code and documentation
on:
push:
branches:
- develop
pull_request:
branches:
- develop
jobs:
test-code-style:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] # Add versions as needed
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: |
poetry install --without docs
- name: Run Pylint
run: |
poetry run pylint arbitragelab tests --rcfile=.pylintrc --output-format=text --output=pylint-report.txt
- name: Upload test results
uses: actions/upload-artifact@v3
with:
name: pylint-report-${{ matrix.python-version }}
path: pylint-report.txt
test-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] # Add versions as needed
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install --upgrade pip
pip install poetry
- name: Install dependencies
run: |
poetry install --without docs
- name: Run tests with coverage
run: |
poetry run pytest tests/ --cov=arbitragelab --cov-report=term --cov-branch --cov-config=.coveragerc
- name: Generate coverage XML report
run: poetry run coverage html
- name: Upload Coverage XML Report as Artifact
uses: actions/upload-artifact@v2
with:
name: coverage-html
path: coverage.html
- name: Check coverage
run: poetry run coverage report --fail-under=100
test-docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install poetry
- name: Install requirements
run: |
poetry install --without tests
- name: Build documentation
run: |
cd docs
poetry run make html
- name: Run doctests
run: |
cd docs
poetry run make doctest
- name: Upload doctest results as an artifact
uses: actions/upload-artifact@v2
with:
name: doctest-results
path: docs/build/doctest/output.txt