Pin dependencies #5875
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 for frontend | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint-type-check: | |
| defaults: | |
| run: | |
| working-directory: web | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # fetch history for all branches and tags | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.14.1 | |
| - name: Install Vue app | |
| run: npm ci | |
| - name: Lint Vue app | |
| run: npm run lint --no-fix | |
| - name: Type-check Vue app | |
| run: npm run type-check | |
| - name: Build Vue app | |
| run: npm run build | |
| test-e2e: | |
| name: E2E tests | |
| runs-on: ubuntu-24.04 | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| env: | |
| POSTGRES_DB: django | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd "pg_isready --username postgres" | |
| --health-start-period 30s | |
| --health-start-interval 2s | |
| ports: | |
| - 5432:5432 | |
| rabbitmq: | |
| image: rabbitmq:management-alpine | |
| options: >- | |
| --health-cmd "rabbitmq-diagnostics ping" | |
| --health-start-period 30s | |
| --health-start-interval 2s | |
| ports: | |
| - 5672:5672 | |
| minio: | |
| # This image does not require any command arguments (which GitHub Actions don't support) | |
| image: bitnamilegacy/minio:latest | |
| env: | |
| MINIO_ROOT_USER: minioAccessKey | |
| MINIO_ROOT_PASSWORD: minioSecretKey | |
| options: >- | |
| --health-cmd "mc ready local" | |
| --health-timeout 1s | |
| --health-start-period 30s | |
| --health-start-interval 2s | |
| ports: | |
| - 9000:9000 | |
| env: | |
| # API server env vars | |
| DJANGO_SETTINGS_MODULE: dandiapi.settings.development | |
| DJANGO_DATABASE_URL: postgres://postgres:postgres@localhost:5432/django | |
| DJANGO_CELERY_BROKER_URL: amqp://localhost:5672/ | |
| DJANGO_MINIO_STORAGE_URL: http://minioAccessKey:minioSecretKey@localhost:9000/django-storage-testing | |
| DJANGO_DANDI_WEB_APP_URL: http://localhost:8085 | |
| DJANGO_DANDI_API_URL: http://localhost:8000 | |
| DJANGO_DANDI_JUPYTERHUB_URL: https://hub.dandiarchive.org/ | |
| DJANGO_DANDI_INSTANCE_NAME: DEV-DANDI | |
| DJANGO_DANDI_INSTANCE_IDENTIFIER: "RRID:ABC_123456" | |
| DJANGO_DANDI_DOI_API_PREFIX: "10.80507" | |
| # Web client env vars | |
| VITE_APP_DANDI_API_ROOT: http://localhost:8000/api/ | |
| VITE_APP_OAUTH_API_ROOT: http://localhost:8000/oauth/ | |
| VITE_APP_OAUTH_CLIENT_ID: Dk0zosgt1GAAKfN8LT4STJmLJXwMDPbYWYzfNtAl | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # fetch history for all branches and tags | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.14.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install web app | |
| run: npm ci | |
| working-directory: web | |
| - name: Apply migrations to API server | |
| run: ./manage.py migrate | |
| - name: Create any cache tables | |
| run: ./manage.py createcachetable | |
| - name: Install test data | |
| run: ./manage.py loaddata playwright | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: e2e | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| working-directory: e2e | |
| - name: Run Playwright tests | |
| run: | | |
| # start vue dev server | |
| npm --prefix web run build 2> /dev/null && npx serve --single web/dist --listen 8085 & | |
| while ! nc -z localhost 8085; do | |
| sleep 3 | |
| done | |
| # start the dandi-api server | |
| ./manage.py runserver & | |
| # run the tests | |
| cd e2e && npx playwright test | |
| - uses: actions/upload-artifact@v6 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: e2e/playwright-report/ | |
| retention-days: 30 |