Skip to content

backtest engine update #12

backtest engine update

backtest engine update #12

Workflow file for this run

name: Build AltoTrader Package

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

you may only define one of `branches` and `branches-ignore` for a single event
on:
push:
branches:
- development
branches-ignore:
- '**' # Ignore all other branches
pull_request:
branches: [ "development" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .[dev]
- name: Run tests
run: |
pytest -W ignore
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
# Add .dev suffix (since we only run for development)
- name: Add dev version suffix
run: |
echo "Adding .dev to package version..."
sed -i 's/^version = "\(.*\)"/version = "\1.dev"/' pyproject.toml
- name: Build package
run: |
python -m build
ls -la dist/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: altotrader # Always this name
path: dist/
if-no-files-found: error