Repository navigation
102 lines (93 loc) · 3.3 KB
/
Copy pathinstall-scripts.yml
File metadata and controls
102 lines (93 loc) · 3.3 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
name: Install Scripts
permissions:
contents: read
on:
push:
branches: [main]
paths:
- ".github/workflows/install-scripts.yml"
- "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"
- "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
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@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22.23.1"
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