Dev/add chroma #15
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
| # .github/workflows/build-test.yml | |
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| types: [ opened, synchronize ] # Trigger when PR opened or commits added | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 # Checks out your repository code | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| # Use the Python version specified in pyproject.toml | |
| # Make sure this matches your requires-python range | |
| python-version: '3.12' | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| virtualenvs-create: true # Recommended to keep envs isolated | |
| virtualenvs-in-project: true # Optional: Keep venv in project dir for caching | |
| installer-parallel: true | |
| # Optional: Cache Poetry virtualenv | |
| - name: Load cached venv | |
| id: cached-poetry-dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
| - name: Install dependencies | |
| if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
| run: poetry install --no-interaction --no-root # Install dependencies only | |
| # Install project and dependencies if cache missed or lock file changed | |
| - name: Install project and dependencies | |
| run: poetry install --no-interaction | |
| - name: Lint with Ruff | |
| run: | | |
| poetry run ruff check . | |
| - name: Check formatting with Ruff | |
| run: | | |
| poetry run ruff format --check . | |
| # Add other steps like running tests using poetry run pytest (if you have tests) | |
| # - name: Run tests | |
| # run: | | |
| # poetry run pytest |