bot listener working now! #736
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
POLYGON_IS_PAID_SUBSCRIPTION: $POLYGON_IS_PAID_SUBSCRIPTION | |
THETADATA_USERNAME: ${{secrets.THETADATA_USERNAME}} | |
THETADATA_PASSWORD: ${{secrets.THETADATA_PASSWORD}} | |
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 | |
# coverage xml -o coverage.xml | |
# - name: Verify Coverage File | |
# run: ls -l coverage.xml | |
# - name: Python Coverage Comment | |
# uses: py-cov-action/[email protected] | |
# with: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# coverage_path: coverage.xml | |