Skip to content

Commit f7866ed

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 119cd7d commit f7866ed

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:
@@ -63,4 +71,29 @@ jobs:
6371
shell: bash
6472
run: |
6573
chmod +x install-cli.sh
66-
bash bin/test_install_script_over_homebrew.sh --token ${{ secrets.GITHUB_TOKEN }}
74+
bash bin/test_install_script_over_homebrew.sh --token ${{ secrets.GITHUB_TOKEN }}
75+
76+
# Note: this job installs from the public npm registry, so on push/PR
77+
# it tests the currently published version — not the code being changed.
78+
# That still catches regressions. The release trigger is what tests new releases.
79+
test-npm:
80+
name: Test npm install on ${{ matrix.os }}
81+
runs-on: ${{ matrix.os }}
82+
strategy:
83+
matrix:
84+
os:
85+
- ubuntu-latest # linux/x64
86+
- ubuntu-24.04-arm # linux/arm64
87+
- macos-latest # darwin/arm64
88+
- macos-13 # darwin/x64
89+
- windows-latest # win32/x64
90+
- windows-11-arm # win32/arm64
91+
92+
steps:
93+
- name: Install @kosli/cli via npm
94+
shell: bash
95+
run: npm install -g @kosli/cli
96+
97+
- name: Verify kosli binary works
98+
shell: bash
99+
run: kosli version

0 commit comments

Comments
 (0)