Merge pull request #99 from RebelliousSmile/claude/new-session-5x7cv1 #103
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_DB: suddenly_test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/suddenly_test | |
| DJANGO_SETTINGS_MODULE: config.settings.development | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install system dependencies | |
| run: sudo apt-get install -y gettext | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e ".[dev,federation]" | |
| - name: Install Node and build frontend | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Build frontend | |
| run: | | |
| npm install -g pnpm | |
| cd frontend && pnpm install --frozen-lockfile && pnpm build | |
| - name: Lint | |
| run: | | |
| ruff check . | |
| ruff format --check . | |
| - name: Type check | |
| run: mypy suddenly/ | |
| - name: Compile translations | |
| run: python manage.py compilemessages | |
| - name: Test with coverage | |
| run: pytest --cov=suddenly --cov-fail-under=50 --tb=short |