Merge pull request #22 from codewithme-py/feat/audit-logging-prices-a… #51
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 init | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # ===== | |
| # Hardcode will be replaced with secrets GitHub Repo | |
| # ===== | |
| services: | |
| postgres: | |
| image: postgres:15-alpine | |
| env: | |
| POSTGRES_USER: fairdrop_user | |
| POSTGRES_PASSWORD: fairdrop_password | |
| POSTGRES_DB: fairdrop_db | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| # ===== | |
| # Hardcode will be replaced with secrets GitHub Repo | |
| # ===== | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up UV (without pip) | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --all-extras --dev | |
| - name: Check lockfile | |
| run: uv lock --check | |
| - name: Check formatting | |
| run: uv run ruff format --check . | |
| - name: Check lint code | |
| run: uv run ruff check . | |
| - name: Run tests | |
| run: uv run pytest --cov-fail-under=70 | |
| - name: Run mypy | |
| run: uv run mypy . |