Skip to content

Commit

Permalink
Edited ci yml for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wleong1 committed Mar 7, 2024
1 parent 8684356 commit aac1a61
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,30 @@ on:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Run tests
run: |
python tests.py # Replace with the command to run your tests
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
Expand All @@ -32,14 +51,15 @@ jobs:
runs-on: ubuntu-latest
name: Mypy
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Dependencies
run: |
pip install mypy
mypy --install-types
- name: mypy
run: |
mypy src/
Expand All @@ -48,9 +68,9 @@ jobs:
runs-on: ubuntu-latest
name: pylint
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Dependencies
Expand All @@ -64,9 +84,9 @@ jobs:
runs-on: ubuntu-latest
name: pytest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/live_price_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from typing import Union, Any
import requests
import yfinance as yf # type: ignore[import-untyped] # pylint: disable=E0401
import yfinance as yf # type: ignore[import-untyped] # pylint: disable=E0401
import pandas as pd

from src.parameters import ALPHA_VANTAGE_API_KEY
from src.parameters import ALPHA_VANTAGE_API_KEY # type: ignore[import-not-found] # pylint: disable=E0611

ALPHA_VANTAGE_ENDPOINT = "https://www.alphavantage.co/query"

Expand Down
2 changes: 1 addition & 1 deletion src/news_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import requests

from src.parameters import NEWS_API_KEY
from src.parameters import NEWS_API_KEY # type: ignore[import-untyped] # pylint: disable=E0611

NEWS_ENDPOINT = "https://newsapi.org/v2/everything"

Expand Down

0 comments on commit aac1a61

Please sign in to comment.