update yfinance table #174
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: Test and Deploy | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install . | |
pip install .[dev] | |
- name: test imports | |
run: | | |
python -c " | |
from folioflex.chatbot import providers, scraper | |
from folioflex.portfolio import broker, heatmap, helper, portfolio, wrappers | |
from folioflex.utils import cli, config_helper, cq, mailer | |
" | |
- name: Run tests with pytest and upload coverage | |
env: | |
HUGCHAT_LOGIN: ${{ secrets.HUGCHAT_LOGIN }} | |
HUGCHAT_PASSWORD: ${{ secrets.HUGCHAT_PASSWORD }} | |
run: pytest --cov=folioflex --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
build_and_push_docker: | |
if: github.ref == 'refs/heads/main' | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: dmbymdt/folioflex:latest |