feat: add backtest CLI to skills and convert examples to Python #128
Workflow file for this run
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: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
| - name: Build | |
| run: cargo build --release | |
| - name: Run tests | |
| run: cargo test --release | |
| - name: Smoke test - all binaries show help | |
| run: | | |
| ./target/release/fintool --help | |
| ./target/release/hyperliquid --help | |
| ./target/release/binance --help | |
| ./target/release/coinbase --help | |
| ./target/release/polymarket --help | |
| ./target/release/okx --help | |
| - name: Smoke test - init | |
| run: | | |
| ./target/release/fintool init | |
| test -f ~/.fintool/config.toml | |
| - name: Configure OpenAI API key | |
| run: | | |
| sed -i 's/# openai_api_key = "sk-..."/openai_api_key = "${{ secrets.OPENAI_API_KEY }}"/' ~/.fintool/config.toml | |
| sed -i 's/# openai_model = "gpt-4.1-mini"/openai_model = "gpt-4.1-mini"/' ~/.fintool/config.toml | |
| - name: Spot quote - crypto | |
| run: | | |
| ./target/release/fintool quote BTC | |
| ./target/release/fintool quote ETH | |
| - name: Spot quote - commodity | |
| run: | | |
| ./target/release/fintool quote GOLD | |
| ./target/release/fintool quote SILVER | |
| - name: Spot quote - stock | |
| run: | | |
| ./target/release/fintool quote AAPL | |
| ./target/release/fintool quote TSLA | |
| - name: Perp quote - crypto | |
| run: | | |
| ./target/release/hyperliquid quote BTC | |
| ./target/release/hyperliquid quote ETH | |
| - name: Perp quote - commodity | |
| run: | | |
| ./target/release/hyperliquid quote GOLD | |
| ./target/release/hyperliquid quote SILVER | |
| - name: Perp quote - stock | |
| run: | | |
| ./target/release/hyperliquid quote TSLA | |
| ./target/release/hyperliquid quote NVDA | |
| - name: News - crypto | |
| run: ./target/release/fintool news BTC | |
| - name: News - commodity | |
| run: ./target/release/fintool news GOLD | |
| - name: News - stock | |
| run: ./target/release/fintool news AAPL | |
| - name: Report - stock | |
| run: | | |
| ./target/release/fintool report list AAPL | |
| ./target/release/fintool report annual AAPL | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-lint-${{ hashFiles('**/Cargo.toml') }} | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy --release -- -D warnings || true |