backtest engine update #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build AltoTrader Package | ||
| 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 | ||