This repository was archived by the owner on Jan 30, 2026. It is now read-only.
chore: update dependencies and add TypeScript reference for routes (#… #1419
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: e2e-test | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - dev | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| # https://github.com/pubky/pubky-stack | |
| PUBKY_STACK_REF: bdc4fd5127093337871a195ce7dcf2b4442df13a | |
| strategy: | |
| matrix: | |
| browser: [chrome] # [chrome, firefox] | |
| steps: | |
| - name: Checkout this repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: pubky-app | |
| - name: Checkout pubky-stack | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: pubky/pubky-stack | |
| ref: ${{ env.PUBKY_STACK_REF }} | |
| path: pubky-stack | |
| submodules: true | |
| token: ${{ secrets.READ_REPOS }} | |
| # cannot use ssh-key (deploy key) for private submodules due to the | |
| # limitation where only a single key can be used per repo checkout | |
| # see https://github.com/actions/checkout/issues/183 | |
| # reduce neo4j memory to prevent | |
| # ERROR Invalid memory configuration - exceeds physical memory. Check the configured values for server.memory.pagecache.size and server.memory.heap.max_size | |
| - name: Modify neo4j.env | |
| working-directory: pubky-stack/docker | |
| run: | | |
| sed -i 's/NEO4J_server_memory_pagecache_size=2G/NEO4J_server_memory_pagecache_size=1G/' neo4j.env | |
| sed -i 's/NEO4J_server_memory_heap_initial__size=4G/NEO4J_server_memory_heap_initial__size=1G/' neo4j.env | |
| sed -i 's/NEO4J_server_memory_heap_max__size=8G/NEO4J_server_memory_heap_max__size=2G/' neo4j.env | |
| - name: Prepare pubky-stack .env | |
| working-directory: pubky-stack/docker | |
| run: | | |
| cp .env-sample .env | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker layer caching | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| /tmp/.buildx-cache-nexus | |
| /tmp/.buildx-cache-homeserver | |
| key: ${{ runner.os }}-pubky-stack-${{ env.PUBKY_STACK_REF }} | |
| - name: Build pubky-nexus | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: pubky-stack/pubky-nexus | |
| load: true | |
| tags: | | |
| nexusd:latest | |
| cache-from: type=local,src=/tmp/.buildx-cache-nexus | |
| cache-to: type=local,dest=/tmp/.buildx-cache-nexus-new,mode=max | |
| - name: Build homeserver | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: pubky-stack/pubky-core | |
| load: true | |
| tags: homeserver:latest | |
| cache-from: type=local,src=/tmp/.buildx-cache-homeserver | |
| cache-to: type=local,dest=/tmp/.buildx-cache-homeserver-new,mode=max | |
| # Overwrite old cache to prevent growing size, see https://github.com/docker/build-push-action/issues/252 | |
| - name: Overwrite old cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache-nexus | |
| mv /tmp/.buildx-cache-nexus-new /tmp/.buildx-cache-nexus | |
| rm -rf /tmp/.buildx-cache-homeserver | |
| mv /tmp/.buildx-cache-homeserver-new /tmp/.buildx-cache-homeserver | |
| - name: Run pubky-stack | |
| working-directory: pubky-stack/docker | |
| run: docker compose up -d nexusd nexus-redis nexus-neo4j homeserver | |
| - name: Wait for dockerised pubky-stack to start | |
| run: | | |
| PORT=8080 | |
| MAX_WAIT=300 # Maximum wait time in seconds (5 minutes) | |
| WAIT_INTERVAL=5 # Interval between checks in seconds | |
| ELAPSED=0 | |
| while ! curl -s http://localhost:$PORT; do | |
| if [ $ELAPSED -ge $MAX_WAIT ]; then | |
| echo "Service did not start within 5 minutes." | |
| exit 1 | |
| fi | |
| echo "Waiting for service on port $PORT to be ready... ($ELAPSED seconds elapsed)" | |
| sleep $WAIT_INTERVAL | |
| ELAPSED=$((ELAPSED + WAIT_INTERVAL)) | |
| done | |
| echo "Service is ready." | |
| - name: Build pubky-app frontend | |
| working-directory: pubky-app | |
| run: | | |
| echo "NEXT_PUBLIC_HOMESERVER=8pinxxgqs41n4aididenw5apqp1urfmzdztr8jt4abrkdn435ewo | |
| NEXT_PUBLIC_NEXUS=http://localhost:8080 | |
| NEXT_PUBLIC_TESTNET=true | |
| NEXT_PUBLIC_DEFAULT_HTTP_RELAY=http://localhost:15412/link/ | |
| NEXT_ENABLE_PLAUSIBLE=false | |
| BASE_URL_SUPPORT=${{ secrets.BASE_URL_SUPPORT }} | |
| SUPPORT_API_ACCESS_TOKEN=${{ secrets.SUPPORT_API_ACCESS_TOKEN }} | |
| SUPPORT_ACCOUNT_ID=1" > .env | |
| npm ci | |
| - name: Run e2e tests (${{ matrix.browser }}) | |
| uses: cypress-io/github-action@v6 | |
| env: | |
| DEBUG: '@cypress/github-action' | |
| with: | |
| working-directory: pubky-app/cypress | |
| config-file: cypress.config.ts | |
| spec: e2e/**/*.cy.ts | |
| browser: ${{ matrix.browser }} | |
| headed: false | |
| summary-title: ${{ matrix.browser }} | |
| install: false | |
| start: npm run start:prod | |
| wait-on: 'http://localhost:4200' | |
| wait-on-timeout: 180 | |
| - name: Run jitless tests (${{ matrix.browser }}) | |
| uses: cypress-io/github-action@v6 | |
| env: | |
| DEBUG: '@cypress/github-action' | |
| with: | |
| working-directory: pubky-app/cypress | |
| config-file: cypress.config.jitless.ts | |
| spec: jitless/jitless.cy.ts | |
| browser: ${{ matrix.browser }} | |
| headed: false | |
| summary-title: ${{ matrix.browser }}-jitless | |
| install: false | |
| # no need to start the server, it's already running | |
| wait-on: 'http://localhost:4200' | |
| wait-on-timeout: 180 | |
| - name: Upload ${{ matrix.browser }} screenshots | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: screenshots-${{ matrix.browser }} | |
| path: pubky-app/cypress/screenshots | |
| - name: Upload video for notifications test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-notifications | |
| path: pubky-app/cypress/videos/notifications.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for settings test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-settings | |
| path: pubky-app/cypress/videos/settings.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for posts test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-posts | |
| path: pubky-app/cypress/videos/posts.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for profile test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-profile | |
| path: pubky-app/cypress/videos/profile.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for search test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-search | |
| path: pubky-app/cypress/videos/search.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for feed test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-feed | |
| path: pubky-app/cypress/videos/feed.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for contacts test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-contacts | |
| path: pubky-app/cypress/videos/contacts.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for onboard test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-onboard | |
| path: pubky-app/cypress/videos/onboard.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload video for jitless test | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: video-${{ matrix.browser }}-jitless | |
| path: pubky-app/cypress/videos/jitless.cy.ts.mp4 | |
| if-no-files-found: ignore | |
| - name: Upload cypress.log | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| name: cypress-log-${{ matrix.browser }} | |
| path: pubky-app/cypress/cypress.log | |
| if-no-files-found: ignore | |
| - name: Dump docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 |