Skip to content

Fixes to Market Data connections #18

Fixes to Market Data connections

Fixes to Market Data connections #18

Workflow file for this run

name: Python Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Run tests with pytest
run: |
pytest --cov=projectx_sdk
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install black flake8 isort mypy
- name: Lint with flake8
run: |
flake8 projectx_sdk tests
- name: Check formatting with black
run: |
black --check projectx_sdk tests
- name: Check imports with isort
run: |
isort --check-only --profile black projectx_sdk tests
- name: Type check with mypy
run: |
mypy projectx_sdk
build:
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package
run: |
python -m build
- name: Check distribution
run: |
twine check dist/*