Using ruamel for round trip yaml file parsing #59
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 ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.13'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install UV | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| - name: Setup environment configuration | |
| run: | | |
| cp .env.example .env | |
| - name: Start dev environment services | |
| run: | | |
| # Deploy dev environment (blocks until services are ready) | |
| uv run api-forge-cli deploy up --no-start-server dev | |
| - name: Run tests | |
| run: | | |
| uv run pytest -v --cov=src --cov-report=xml --ignore=tests/e2e | |
| - name: Show service logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Docker Compose Services ===" | |
| docker compose -f docker-compose.dev.yml ps | |
| echo "" | |
| echo "=== PostgreSQL Logs ===" | |
| docker compose -f docker-compose.dev.yml logs postgres --tail=100 | |
| echo "" | |
| echo "=== Redis Logs ===" | |
| docker compose -f docker-compose.dev.yml logs redis --tail=100 | |
| echo "" | |
| echo "=== Keycloak Logs ===" | |
| docker compose -f docker-compose.dev.yml logs keycloak --tail=100 | |
| echo "" | |
| echo "=== Temporal Logs ===" | |
| docker compose -f docker-compose.dev.yml logs temporal --tail=100 | |
| echo "" | |
| echo "=== Keycloak Setup Logs ===" | |
| docker compose -f docker-compose.dev.yml logs keycloak-setup --tail=100 | |
| echo "" | |
| echo "=== Worker Logs ===" | |
| docker compose -f docker-compose.dev.yml logs worker --tail=100 | |
| - name: Stop dev environment | |
| if: always() | |
| run: | | |
| uv run api-forge-cli deploy down dev | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.13' | |
| - name: Install UV | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: | | |
| uv sync --dev | |
| - name: Run ruff (linting) | |
| run: | | |
| uv run ruff check . | |
| - name: Run ruff (formatting) | |
| run: | | |
| uv run ruff format --check . | |
| - name: Run mypy (type checking) | |
| run: | | |
| uv run mypy src |