Skip to content

Refactor JustETF class to Ticker class and add test for NoISINError e… #55

Refactor JustETF class to Ticker class and add test for NoISINError e…

Refactor JustETF class to Ticker class and add test for NoISINError e… #55

Workflow file for this run

name: pre-deploy (linters)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths:
- src/**.py
- tests/**.py
workflow_dispatch:
jobs:
pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py') --fail-under=1
format:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black==24.1.1 isort==5.12.0
- name: Run black
run: |
black --check .
- name: Run isort
run: |
isort --profile black --check --diff .
flake8:
name: check code style with flake8
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: run flake8
run: |
pip install flake8
flake8 --max-line-length=99 --extend-ignore=E402
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python version
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_tests.txt
- name: run pytest
run: |
pytest