Chapter 4 #223
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
| # Copyright (c) Sebastian Raschka under Apache License 2.0 (see LICENSE.txt) | |
| # Source for "Build a Reasoning Model (From Scratch)": https://mng.bz/lZ5B | |
| # Code repository: https://github.com/rasbt/reasoning-from-scratch | |
| name: Code Tests (Plain pip) | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '**/*.py' | |
| - '**/*.ipynb' | |
| - '**/*.yaml' | |
| - '**/*.yml' | |
| - '**/*.sh' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - '**/*.py' | |
| - '**/*.ipynb' | |
| - '**/*.yaml' | |
| - '**/*.yml' | |
| - '**/*.sh' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pip-tests: | |
| name: Pip Tests (Ubuntu Only) | |
| runs-on: ubuntu-latest | |
| env: | |
| SKIP_EXPENSIVE: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Create Virtual Environment and Install Dependencies | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install . | |
| pip install pytest | |
| - name: Test Selected Python Scripts | |
| run: | | |
| source .venv/bin/activate | |
| pytest tests |