shorten day text in day view calendar #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: Tests and Quality Checks | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| # Frontend linting and build test | |
| frontend-tests: | |
| runs-on: ubuntu-latest | |
| name: Frontend Linting & Build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install frontend dependencies | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Run ESLint | |
| working-directory: frontend | |
| run: npm run lint | |
| - name: Build frontend | |
| working-directory: frontend | |
| run: npm run build | |
| # Backend linting and tests | |
| backend-tests: | |
| runs-on: ubuntu-latest | |
| name: Backend Linting & Tests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('backend/requirements.txt', 'backend/requirements-dev.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install backend dependencies | |
| working-directory: backend | |
| run: | | |
| pip install --upgrade pip setuptools wheel | |
| pip install -r requirements.txt | |
| pip install -r requirements-dev.txt | |
| - name: Run Python linting and formatting (ruff) | |
| working-directory: backend | |
| run: | | |
| ruff check . | |
| ruff format --check . | |
| - name: Run Django system checks | |
| working-directory: backend | |
| env: | |
| USE_SQLITE: "1" # Use SQLite for testing | |
| run: python manage.py check | |
| # Instagram workflow validation (commented out - requires database setup) | |
| # instagram-workflow-test: | |
| # runs-on: ubuntu-latest | |
| # name: Instagram Workflow Validation | |
| # | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # | |
| # - name: Set up Python | |
| # uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: '3.11' | |
| # | |
| # - name: Cache pip | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: ~/.cache/pip | |
| # key: ${{ runner.os }}-pip-${{ hashFiles('backend/requirements.txt') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-pip- | |
| # | |
| # - name: Install dependencies | |
| # working-directory: backend | |
| # run: | | |
| # pip install --upgrade pip setuptools wheel | |
| # pip install -r requirements.txt | |
| # | |
| # - name: Validate Instagram scraper syntax | |
| # working-directory: backend/scraping | |
| # run: python -m py_compile instagram_feed.py | |
| # | |
| # - name: Validate static events generator syntax | |
| # working-directory: backend/scraping | |
| # run: python -m py_compile get_static_events.py | |
| # | |
| # - name: Test database connection (dry run) | |
| # working-directory: backend | |
| # env: | |
| # USE_SQLITE: "1" # Use SQLite for testing | |
| # run: | | |
| # python manage.py migrate | |
| # python -c " | |
| # import os | |
| # os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.settings') | |
| # import django | |
| # django.setup() | |
| # from example.models import Events, Clubs | |
| # print('Database models loaded successfully') | |
| # print(f'Events count: {Events.objects.count()}') | |
| # print(f'Clubs count: {Clubs.objects.count()}') | |
| # " | |
| # | |
| # - name: Validate workflow file syntax | |
| # run: | | |
| # # Check if the workflow YAML is valid | |
| # python -c " | |
| # import yaml | |
| # with open('.github/workflows/instagram_feed.yml', 'r') as f: | |
| # workflow = yaml.safe_load(f) | |
| # print('Instagram workflow YAML is valid') | |
| # print(f'Workflow name: {workflow.get(\"name\")}') | |
| # print(f'Trigger: {list(workflow.get(\"on\", {}).keys())}') | |
| # " | |
| # Summary job that depends on all tests | |
| test-summary: | |
| runs-on: ubuntu-latest | |
| name: Test Summary | |
| needs: [frontend-tests, backend-tests] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| echo "Frontend tests: ${{ needs.frontend-tests.result }}" | |
| echo "Backend tests: ${{ needs.backend-tests.result }}" | |
| if [[ "${{ needs.frontend-tests.result }}" != "success" || | |
| "${{ needs.backend-tests.result }}" != "success" ]]; then | |
| echo "❌ Some tests failed!" | |
| exit 1 | |
| else | |
| echo "✅ All tests passed!" | |
| fi |