Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme22 committed Sep 24, 2024
1 parent 5efa84d commit 3540b0f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
40 changes: 19 additions & 21 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,24 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Linting...
run: |
isort --check --diff tradestation/ tests/
flake8 --count --show-source --statistics tradestation/ tests/
mypy -p tradestation
- name: Testing...
run: |
python -m pytest --cov=tradestation --cov-report=term-missing tests/ --cov-fail-under=95
env:
TS_API_KEY: ${{ secrets.TS_API_KEY }}
- uses: actions/checkout@v3
- name: Set up Python 3.12
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- uses: yezz123/setup-uv@v4
- name: Lint with ruff
- run: |
uv run ruff check tradestation/
uv run ruff check tests/
env:
TS_API_KEY: ${{ secrets.TS_API_KEY }}
- name: Type check with mypy
- run: |
uv run mypy -p tradestation
uv run mypy -p tests
- name: Test with pytest
- run: |
uv run pytest --cov=tradestation --cov-report=term-missing tests/ --cov-fail-under=95
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.PHONY: lint test docs
.PHONY: install lint test docs

install:
uv sync
uv pip install -e .

lint:
uv run ruff check tradestation/
Expand Down
7 changes: 7 additions & 0 deletions tests/test_session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from tradestation.session import Session


def test_session():
session = Session()
assert session is not None

0 comments on commit 3540b0f

Please sign in to comment.