feat: add pending trades and Finlab-compatible actions() #20
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test-rust: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check | |
| run: cargo check | |
| - name: Test btcore | |
| run: cargo test -p btcore | |
| - name: Clippy | |
| # TODO: fix clippy warnings and enable -D warnings | |
| # run: cargo clippy -- -D warnings | |
| run: cargo clippy | |
| test-python: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Setup Python | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| working-directory: polars_backtest | |
| run: uv sync | |
| - name: Build extension | |
| working-directory: polars_backtest | |
| run: uv run maturin develop --release | |
| - name: Run tests | |
| working-directory: polars_backtest | |
| run: uv run pytest tests/ -v |