-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (76 loc) · 2.95 KB
/
Copy pathci.yml
File metadata and controls
95 lines (76 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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