Extract USER_AGENT constant, inline price_min/max, remove _change wra… #75
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, v2] | |
| pull_request: | |
| branches: [main, v2] | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| lint: | |
| name: Lint Python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install lint tools | |
| run: pip install ruff | |
| - name: Run ruff | |
| run: ruff check . | |
| docker: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Create test .env | |
| run: | | |
| cp .env.example .env | |
| echo "DATABASE_URL=postgresql://postgres:postgres@postgres:5432/pricebot" >> .env | |
| - name: Build Docker Compose | |
| run: docker compose build | |
| - name: Check Docker Compose validity | |
| run: docker compose config --quiet | |
| smoke-test: | |
| name: Smoke Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Create test .env | |
| run: | | |
| cp .env.example .env | |
| echo "DATABASE_URL=postgresql://postgres:postgres@postgres:5432/pricebot" >> .env | |
| - name: Start services | |
| run: docker compose up -d | |
| - name: Wait for postgres | |
| run: | | |
| for i in {1..30}; do | |
| if docker compose exec -T postgres pg_isready -U postgres > /dev/null 2>&1; then | |
| echo "Postgres ready" | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "Postgres failed to start" | |
| exit 1 | |
| - name: Check bot container | |
| run: | | |
| sleep 5 | |
| docker compose ps | |
| - name: Check bot logs | |
| run: | | |
| docker compose logs bot | head -20 | |
| - name: Stop services | |
| if: always() | |
| run: docker compose down |