forked from ilysenko/codex-desktop-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 1.72 KB
/
Copy pathinstall-deps.yml
File metadata and controls
61 lines (55 loc) · 1.72 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
name: Install Dependencies
on:
pull_request:
paths:
- install.sh
- scripts/install-deps.sh
- packaging/linux/control
- .github/workflows/install-deps.yml
push:
branches:
- main
paths:
- install.sh
- scripts/install-deps.sh
- packaging/linux/control
- .github/workflows/install-deps.yml
jobs:
apt-node-bootstrap:
name: ${{ matrix.image }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
options: --user root
strategy:
fail-fast: false
matrix:
image:
- docker.io/library/ubuntu:22.04
- docker.io/library/ubuntu:24.04
- docker.io/library/debian:12
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v7
- name: Bootstrap sudo
run: |
apt-get update -qq >/dev/null
apt-get install -y sudo ca-certificates >/dev/null
- name: Install dependencies
run: bash scripts/install-deps.sh
- name: Verify Node.js toolchain
run: |
node -p "process.versions.node"
node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)'
npm -v
npx -v
dpkg-query -W -f='${Provides}\n' nodejs | grep -E '(^|[,[:space:]])npm([,[:space:](]|$)'
- name: Verify installer passes Node preflight
run: |
export PATH="$HOME/.local/bin:$PATH"
output=$(./install.sh /tmp/nope.dmg 2>&1) && status=0 || status=$?
printf '%s\n' "$output"
test "$status" -ne 0
printf '%s\n' "$output" | grep -q "Provided DMG not found: /tmp/nope.dmg"
! printf '%s\n' "$output" | grep -q "Node.js 20+ required"