Fix the desktop launch crash, add tui/desktop commands, ssh_config br… #9
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: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # No `version:` input: the action reads `packageManager` from | |
| # package.json, and specifying both is an error. The pinned | |
| # pnpm@11.18.0 there is the more precise source anyway. | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| # The live tests drive the real rsync binary. Assert the version so a | |
| # runner image change that moves across the 3.2.4 secluded-args boundary | |
| # shows up here rather than as a mystery later. | |
| - name: rsync version | |
| run: rsync --version | head -1 | |
| - run: pnpm install --frozen-lockfile | |
| # The engine and the CLI first: the app builds and the typechecks below | |
| # consume their emitted types. | |
| - run: pnpm build | |
| - run: pnpm typecheck | |
| - run: pnpm test | |
| # The two apps are built separately from `pnpm build` because neither is | |
| # needed to run the tests, but both have to compile before a release. | |
| - name: Build the marketing site | |
| run: pnpm --filter @diskpush/web build | |
| - name: Build the desktop app | |
| run: pnpm --filter @diskpush/desktop build | |
| # The app starting is not something the unit tests can check. Without a | |
| # display it fails at the display, and reaching that point proves main, | |
| # preload and everything they import loaded. | |
| - name: Desktop starts | |
| run: pnpm smoke:desktop | |
| integration: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # No `version:` input: the action reads `packageManager` from | |
| # package.json, and specifying both is an error. The pinned | |
| # pnpm@11.18.0 there is the more precise source anyway. | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - name: Generate a throwaway key for the test containers | |
| run: ssh-keygen -t ed25519 -N '' -f docker/test-ssh-server/test_key | |
| - name: Start the test SSH servers | |
| run: docker compose -f docker/test-ssh-server/compose.yml up -d --build | |
| - name: Wait for sshd | |
| run: | | |
| for i in $(seq 1 30); do | |
| if nc -z localhost 2222; then echo "up"; exit 0; fi | |
| sleep 1 | |
| done | |
| echo "sshd never came up"; exit 1 | |
| - name: Integration tests | |
| env: | |
| DISKPUSH_TEST_SSH: '1' | |
| DISKPUSH_TEST_SSH_HOST: localhost | |
| DISKPUSH_TEST_SSH_PORT: '2222' | |
| DISKPUSH_TEST_SSH_USER: diskpush | |
| DISKPUSH_TEST_SSH_KEY: docker/test-ssh-server/test_key | |
| run: pnpm vitest run --config vitest.integration.config.ts | |
| - name: Server logs | |
| if: failure() | |
| run: docker compose -f docker/test-ssh-server/compose.yml logs |