Repository navigation
130 lines (120 loc) · 4.2 KB
/
Copy pathinstall-scripts.yml
File metadata and controls
130 lines (120 loc) · 4.2 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Install Scripts
permissions:
contents: read
on:
push:
branches: [main]
paths:
- ".github/workflows/install-scripts.yml"
- "scripts/check-installer-libc.sh"
- "packages/cli/install"
- "packages/cli/install.ps1"
- "packages/cli/src/commands/cli/setup.ts"
- "packages/cli/src/lib/windows-path.ts"
- "packages/cli/test/lib/windows-path.test.ts"
pull_request:
paths:
- ".github/workflows/install-scripts.yml"
- "scripts/check-installer-libc.sh"
- "packages/cli/install"
- "packages/cli/install.ps1"
- "packages/cli/src/commands/cli/setup.ts"
- "packages/cli/src/lib/windows-path.ts"
- "packages/cli/test/lib/windows-path.test.ts"
jobs:
unix-bash:
name: bash installs latest (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
env:
SENTRY_CLI_NO_TELEMETRY: "1"
steps:
- uses: actions/checkout@v4
- name: Install through curl | bash
run: |
export SENTRY_INSTALL_DIR="$RUNNER_TEMP/sentry-bin"
bash < packages/cli/install
installed=$("$SENTRY_INSTALL_DIR/sentry" --version)
echo "Installed sentry $installed"
- name: Find sentry on PATH in a later step
run: |
echo "Resolved $(command -v sentry)"
sentry --version
# glibc distros with the musl package installed have the musl loader, which
# the installer once took as proof of musl. Alpine must still be refused.
linux-libc:
name: bash detects ${{ matrix.libc }} on ${{ matrix.image }}
runs-on: ubuntu-latest
timeout-minutes: 15
container: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- image: debian:stable-slim
libc: glibc
- image: archlinux:latest
libc: glibc
- image: alpine:latest
libc: musl
env:
EXPECTED_LIBC: ${{ matrix.libc }}
SENTRY_CLI_NO_TELEMETRY: "1"
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- run: sh scripts/check-installer-libc.sh
windows-powershell:
name: ${{ matrix.shell }} installs latest
runs-on: windows-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# pwsh is PowerShell 7; powershell is the Windows PowerShell 5.1 that
# ships with Windows.
shell: [pwsh, powershell]
defaults:
run:
shell: ${{ matrix.shell }}
env:
SENTRY_CLI_NO_TELEMETRY: "1"
steps:
- uses: actions/checkout@v4
- name: Install through Invoke-Expression
run: |
$env:SENTRY_INSTALL_DIR = Join-Path $env:RUNNER_TEMP 'sentry-bin'
Get-Content -Raw -LiteralPath packages/cli/install.ps1 | Invoke-Expression
$installed = & (Join-Path $env:SENTRY_INSTALL_DIR 'sentry.exe') --version
if ($LASTEXITCODE -ne 0) { throw "sentry --version exited with $LASTEXITCODE" }
"Installed sentry $installed"
- name: Find sentry on PATH in a later step
run: |
$command = Get-Command sentry -ErrorAction Stop
"Resolved $($command.Source)"
sentry --version
if ($LASTEXITCODE -ne 0) { throw "sentry --version exited with $LASTEXITCODE" }
# The installer smoke tests above run the latest released binary. This job
# exercises this branch's Windows user PATH code against the real registry.
windows-user-path:
name: setup edits the Windows user PATH
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22.23.4"
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Run the registry-backed tests
working-directory: packages/cli
run: pnpm exec vitest run test/lib/windows-path.test.ts