Repository navigation
62 lines (59 loc) · 2.37 KB
/
Copy pathe2e.yml
File metadata and controls
62 lines (59 loc) · 2.37 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
name: E2E tests
on:
push:
branches: [main]
workflow_dispatch:
permissions: {}
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '24'
check-latest: true
- name: Configure sandboxing
timeout-minutes: 15
run: |
# Acquire::*::Timeout only guards a single socket operation, so a mirror
# that stalls once the headers are in never trips it -- that ate a 6h
# runner limit, then a 5min step cap. Kill each attempt from the outside
# and retry the fetch instead. No Acquire::Retries: apt retrying inside a
# killed window would just burn the budget without ever finishing.
#
# The per-attempt budgets are generous on purpose. When the image's
# package lists are stale, a healthy `update` pulls ~5MB of indexes and
# takes about two minutes; a tighter cap killed it mid-download three
# times in a row and turned "slow but fine" into a failed release.
# Languages=none drops the Translation-* files, which nothing here reads.
apt_opts=(-o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30 -o Acquire::Languages=none)
for attempt in 1 2; do
if timeout 300 sudo apt-get "${apt_opts[@]}" update \
&& timeout 120 sudo apt-get "${apt_opts[@]}" install --yes bubblewrap; then
installed=yes
break
fi
echo "apt attempt ${attempt} stalled or failed, retrying"
sleep 10
done
if [ -z "${installed:-}" ]; then
echo "::error::bubblewrap install failed after 3 attempts"
exit 1
fi
sudo sysctl -w kernel.unprivileged_userns_clone=1
if [ -f /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
- name: Install dependencies
run: npm ci
- name: Run e2e tests
# The suite drives a live model, so a wedged turn hangs instead of
# failing. Bound it well above the ~2min happy path.
timeout-minutes: 15
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npm run test:e2e