Spaces:
Paused
Paused
Download .github/workflows/ci.yml from nathycodes/presentercoach: direct link, hf CLI and curl.
- Browser
- Download file 2.65 kB
-
https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/.github/workflows/ci.yml
- Command line
-
hf download hf://spaces/nathycodes/presentercoach/.github/workflows/ci.yml
-
curl -L -o ci.yml https://huggingface.co/spaces/nathycodes/presentercoach/resolve/main/.github/workflows/ci.yml
2.65 kB
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_VERSION: "20" | |
| PYTHON_VERSION: "3.11" | |
| jobs: | |
| web: | |
| name: Web | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - run: npm ci | |
| - run: npm --workspace apps/web run lint | |
| - run: npm --workspace apps/web exec tsc -- --noEmit | |
| - run: npm --workspace apps/web test -- --run | |
| - run: npm --workspace apps/web run build | |
| env: | |
| NEXT_TELEMETRY_DISABLED: 1 | |
| shared: | |
| name: Shared | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - run: npm ci | |
| - run: npm --workspace packages/shared exec tsc -- --noEmit | |
| api: | |
| name: API | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: video | |
| POSTGRES_PASSWORD: video | |
| POSTGRES_DB: video | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U video -d video" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 5 | |
| defaults: | |
| run: | |
| working-directory: apps/api | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| cache-dependency-path: apps/api/requirements-dev.txt | |
| - run: python -m pip install --upgrade pip | |
| - run: pip install -r requirements-dev.txt | |
| - run: ruff check . | |
| - run: mypy src/app --ignore-missing-imports --no-error-summary | |
| - run: PYTHONPATH=src pytest -q --cov=app --cov-report=term-missing | |
| env: | |
| DATABASE_URL: sqlite:///./ci_test.db | |
| JWT_SECRET: ci-test-secret | |
| ENVIRONMENT: test | |
| CORS_ORIGINS: http://localhost:3000 | |
| docker: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: [web, shared, api] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: docker compose build | |