feat: Update examples and core runtime improvements #21
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: Tests | |
| on: | |
| push: | |
| branches: [ main, master, develop, claude/* ] | |
| pull_request: | |
| branches: [ main, master, develop ] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| pip install pillow scipy | |
| - name: Run tests with pytest | |
| run: | | |
| pytest -v --tb=short | |
| - name: Run tests with coverage (Ubuntu + Python 3.11 only) | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| run: | | |
| pytest --cov=morphogen --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov (Ubuntu + Python 3.11 only) | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| verbose: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: 'pip' | |
| - name: Install linting tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run ruff | |
| run: | | |
| ruff check morphogen/ tests/ --select=E,F,W --ignore=E501 | |
| continue-on-error: true | |
| - name: Run black (check only) | |
| run: | | |
| black --check morphogen/ tests/ | |
| continue-on-error: true | |
| test-summary: | |
| runs-on: ubuntu-latest | |
| needs: [test, lint] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "Tests completed" | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "Tests failed!" | |
| exit 1 | |
| fi |