docs: restructure guides into topic-based sections #55
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 | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| workflow_dispatch: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| strategy: | |
| matrix: | |
| python-version: [3.11, 3.12] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python3 - | |
| - name: Configure Poetry | |
| run: | | |
| poetry config virtualenvs.create true | |
| poetry config virtualenvs.in-project true | |
| - name: Cache Poetry virtualenv | |
| uses: actions/cache@v3 | |
| id: cache | |
| with: | |
| path: ./.venv | |
| key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-poetry- | |
| - name: Install dependencies | |
| run: | | |
| poetry install --with demo,dev | |
| - name: Run linting and formatting checks | |
| run: | | |
| poetry run make lint | |
| poetry run make format | |
| - name: Create test environment file | |
| run: | | |
| echo "REDIS_HOST=localhost" > .env | |
| echo "REDIS_PORT=6379" >> .env | |
| echo "GROQ_API_KEY=dummy-key" >> .env | |
| - name: Run tests | |
| if: hashFiles('tests/**/*.py') != '' | |
| run: | | |
| poetry run pytest tests/ -q | |
| - name: Skip tests | |
| if: hashFiles('tests/**/*.py') == '' | |
| run: | | |
| echo "No tests found - skipping test step" |