Skip to content

bug fix

bug fix #436

Workflow file for this run

name: LumiBot CI/CD
on: [pull_request]
permissions:
# Gives the action the necessary permissions for publishing new
# comments in pull requests.
pull-requests: write
# Gives the action the necessary permissions for editing existing
# comments (to avoid publishing multiple comments in the same PR)
contents: write
# Gives the action the necessary permissions for looking up the
# workflow that launched this workflow, and download the related
# artifact that contains the comment to be published
actions: read
jobs:
LintAndTest:
runs-on: ubuntu-latest
timeout-minutes: 20
environment: unit-tests
env:
AIOHTTP_NO_EXTENSIONS: 1
POLYGON_API_KEY: ${{secrets.POLYGON_API_KEY}} # Required for Polygon API BackTests
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
- name: Install dependencies
run: |
echo "Set AIOHTTP_NO_EXTENSIONS=$AIOHTTP_NO_EXTENSIONS so that aiohttp doesn't try to install C extensions"
python -m pip install --upgrade pip
pip install requests
pip install -r requirements_dev.txt
# Setup.py was not working for some reason, reverted to using requirements.txt again
# python setup.py install
- name: Run Linter
run: |
# Remove -e flag to fail the run if issues are found
ruff check . -e
- name: Run Unit Tests
run: |
coverage run
coverage report
coverage html
- name: Python Coverage Comment
uses: py-cov-action/[email protected]
with:
GITHUB_TOKEN: ${{ github.token }}
coverage_path: coverage.xml