Skip to content

Commit 85be13d

Browse files
committed
Add npm installation test job to install-script-tests workflow
- Test npm install -g @kosli/cli on all 6 supported platforms - Trigger on release (published) to test newly published packages - Also trigger on push/PR to npm/**, .goreleaser.yml, and scripts/npm-publish.sh
1 parent 2de28d3 commit 85be13d

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/install-script-tests.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ on:
77
- '.github/workflows/install-script-tests.yml'
88
- 'bin/test_install_script.sh'
99
- 'bin/test_install_script_over_homebrew.sh'
10+
- 'npm/**'
11+
- '.goreleaser.yml'
12+
- 'scripts/npm-publish.sh'
1013
pull_request:
1114
paths:
1215
- 'install-cli.sh'
1316
- '.github/workflows/install-script-tests.yml'
1417
- 'bin/test_install_script.sh'
1518
- 'bin/test_install_script_over_homebrew.sh'
19+
- 'npm/**'
20+
- '.goreleaser.yml'
21+
- 'scripts/npm-publish.sh'
1622
workflow_dispatch:
23+
release:
24+
types: [published]
1725

1826
jobs:
1927
test-script:
@@ -53,4 +61,29 @@ jobs:
5361
shell: bash
5462
run: |
5563
chmod +x install-cli.sh
56-
bash bin/test_install_script_over_homebrew.sh --token ${{ secrets.GITHUB_TOKEN }}
64+
bash bin/test_install_script_over_homebrew.sh --token ${{ secrets.GITHUB_TOKEN }}
65+
66+
# Note: this job installs from the public npm registry, so on push/PR
67+
# it tests the currently published version — not the code being changed.
68+
# That still catches regressions. The release trigger is what tests new releases.
69+
test-npm:
70+
name: Test npm install on ${{ matrix.os }}
71+
runs-on: ${{ matrix.os }}
72+
strategy:
73+
matrix:
74+
os:
75+
- ubuntu-latest # linux/x64
76+
- ubuntu-24.04-arm # linux/arm64
77+
- macos-latest # darwin/arm64
78+
- macos-13 # darwin/x64
79+
- windows-latest # win32/x64
80+
- windows-11-arm # win32/arm64
81+
82+
steps:
83+
- name: Install @kosli/cli via npm
84+
shell: bash
85+
run: npm install -g @kosli/cli
86+
87+
- name: Verify kosli binary works
88+
shell: bash
89+
run: kosli version

0 commit comments

Comments
 (0)