Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/test-msi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Description: This workflow runs tests for hustcer/deepseek-review.
# REF:
# - https://github.com/vyadh/nutest/blob/main/.github/workflows/tests.yaml
# - https://github.com/fdncred/winget-pkgs/blob/master/doc/manifest/schema/1.10.0/installer.md
# - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables

name: Run MSI Install Tests

on:
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:
push:
branches:
- main
- develop
- feature/msi-test
paths-ignore:
- '**.md'
- 'docs/**'
schedule:
- cron: '0 0 * * *' # Run every morning at 0am UTC

permissions:
contents: read

jobs:
run-tests:
name: MSI Install Tests

strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-latest, windows-2025, windows-11-arm]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Checkout Nutest Repo
uses: actions/checkout@v4
with:
ref: v1.1.0
path: nutest
repository: vyadh/nutest
sparse-checkout: nutest/

- name: Setup Nu
uses: hustcer/setup-nu@v3
with:
version: 'nightly'

- name: Test MSI Install
shell: nu {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
use ${{ github.workspace }}/nutest/nutest
(
nutest run-tests
--fail
--display terminal
--report { type: junit, path: test-report.xml }
--returns summary | to json | save --force test-summary.json
)
93 changes: 93 additions & 0 deletions .github/workflows/test-winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Description: This workflow runs tests for hustcer/deepseek-review.
# REF:
# - https://github.com/vyadh/nutest/blob/main/.github/workflows/tests.yaml
# - https://github.com/fdncred/winget-pkgs/blob/master/doc/manifest/schema/1.10.0/installer.md
# - https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables

name: Run Winget Install Tests

on:
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
workflow_dispatch:
push:
branches:
- main
- develop
- feature/msi-test
paths-ignore:
- '**.md'
- 'docs/**'
schedule:
- cron: '0 0 * * *' # Run every morning at 0am UTC

permissions:
contents: read

jobs:
default-scope:
name: Install with Default Scope

strategy:
fail-fast: false
matrix:
os: [windows-latest, windows-2025]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install winget
if: ${{ matrix.os == 'windows-latest' }}
uses: Cyberboss/install-winget@v1

- name: Upgrade Winget
run: |
winget --version
# winget upgrade winget --accept-package-agreements --accept-source-agreements --disable-interactivity
# winget --version
# winget install Nushell.Nushell --disable-interactivity --accept-source-agreements

- name: Setup Nu
uses: hustcer/setup-nu@v3
with:
version: 'nightly'

- name: Test Winget Install with Default Scope
shell: nu {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
nu tests/winget-install.nu

user-scope:
name: Install with User Scope

strategy:
fail-fast: false
matrix:
os: [windows-latest, windows-2025]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Install winget
if: ${{ matrix.os == 'windows-latest' }}
uses: Cyberboss/install-winget@v1

- name: Setup Nu
uses: hustcer/setup-nu@v3
with:
version: 'nightly'

- name: Test Winget Install with User Scope
shell: nu {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
nu tests/winget-install.nu --scope user
8 changes: 8 additions & 0 deletions cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ words:
- Pkgs
- esep
- dpkg
- hkcu
- maint
- rsort
- cnqoj
Expand All @@ -24,20 +25,26 @@ words:
- mipsle
- GOARCH
- pacman
- vyadh
- nutest
- winget
- gpgkey
- debsign
- msiexec
- dearmor
- libexec
- nushell
- Gemfury
- hustcer
- rsbuild
- ALLUSERS
- modeline
- gpgcheck
- justfile
- lefthook
- linewise
- deepseek
- Cyberboss
- softprops
- noconfirm
- modelines
Expand All @@ -50,4 +57,5 @@ words:
- goreleaser
- rockylinux
- Infinigence
- MSIINSTALLPERUSER
ignorePaths:
37 changes: 37 additions & 0 deletions manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.installer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Created with WinGet Releaser using komac v2.11.2
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.9.0.schema.json

PackageIdentifier: Nushell.Nushell
PackageVersion: 0.104.1
InstallerLocale: en-US
InstallerType: wix
Scope: user
InstallModes:
- interactive
- silent
- silentWithProgress
UpgradeBehavior: install
Commands:
- nu
ReleaseDate: 2025-05-11
InstallationMetadata:
DefaultInstallLocation: nu
Installers:
- Architecture: x64
InstallerUrl: https://github.com/nushell/nightly/releases/download/v0.104.1/nu-0.104.1-x86_64-pc-windows-msvc.msi
InstallerSha256: 5FAC52A2590F118EF96447B256AD53229BDF4CC03E3B0094F51A2E53D38A260B
ProductCode: '{2DDEA6A2-DFD6-4DD7-8A4F-42F289D8EE78}'
AppsAndFeaturesEntries:
- DisplayName: Nushell
ProductCode: '{2DDEA6A2-DFD6-4DD7-8A4F-42F289D8EE78}'
UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}'
- Architecture: arm64
InstallerUrl: https://github.com/nushell/nightly/releases/download/v0.104.1/nu-0.104.1-aarch64-pc-windows-msvc.msi
InstallerSha256: DE389519623B4A3A190579642CE1412F76079698E5F92F41AF534C8DBD6D3583
ProductCode: '{7B0C8A48-CE94-4A3C-B5AB-5A011764C588}'
AppsAndFeaturesEntries:
- DisplayName: Nushell
ProductCode: '{7B0C8A48-CE94-4A3C-B5AB-5A011764C588}'
UpgradeCode: '{82D756D2-19FA-4F09-B10F-64942E89F364}'
ManifestType: installer
ManifestVersion: 1.9.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Created with WinGet Releaser using komac v2.11.2
# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.9.0.schema.json

PackageIdentifier: Nushell.Nushell
PackageVersion: 0.104.1
PackageLocale: en-US
Publisher: The Nushell Project Developers
PublisherUrl: https://www.nushell.sh/
PublisherSupportUrl: https://github.com/nushell/nushell/issues
Author: The Nu Project Contributors
PackageName: nu
PackageUrl: https://github.com/nushell/nushell
License: MIT
LicenseUrl: https://github.com/nushell/nushell/blob/HEAD/LICENSE
Copyright: Copyright (c) 2019 - 2021 Yehuda Katz, Jonathan Turner
CopyrightUrl: https://raw.githubusercontent.com/nushell/nushell/main/LICENSE
ShortDescription: A new type of shell
Description: |-
Hello, and welcome to the Nushell project.
The goal of this project is to take the Unix philosophy of shells, where pipes connect simple commands together, and bring it to the modern style of development.
Nu takes cues from a lot of familiar territory, traditional shells like bash, object based shells like PowerShell, functional programming, systems programming, and more.
Moniker: nushell
Tags:
- rust
- shell
ReleaseNotes: |-
This is the 0.104.0 release of Nushell. You can learn more about this release here: https://www.nushell.sh/blog/2025-04-29-nushell_0_104_0.html
For convenience, we are providing full builds for Windows, Linux, and macOS. Be sure you have the requirements to enable all capabilities: https://www.nushell.sh/book/installation.html#dependencies
This release was made possible by PR contributions from @0x4D5352, @132ikl, @app/dependabot, @AucaCoyan, @ayax79, @Bahex, @blindFS, @cosineblast, @cptpiepmatz, @fdncred, @fennewald, @g2p, @hfrentzel, @hustcer, @IanManske, @jjflash95, @kidrigger, @lazenga, @LoicRiegel, @migraine-user, @MMesch, @mokurin000, @Mrfiregem, @mztikk, @NotTheDr01ds, @pyz4, @scarlet-storm, @sebasnallar, @sgvictorino, @sholderbach, @SkillFlame, @suimong, @Tyarel8, @vansh284, @whiter001, @WindSoilder, @ysthakur, @zhiburt
ReleaseNotesUrl: https://github.com/nushell/nightly/releases/tag/v0.104.1
ManifestType: defaultLocale
ManifestVersion: 1.9.0
8 changes: 8 additions & 0 deletions manifests/n/Nushell/Nushell/0.104.1/Nushell.Nushell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Created with WinGet Releaser using komac v2.11.2
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.9.0.schema.json

PackageIdentifier: Nushell.Nushell
PackageVersion: 0.104.1
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.9.0
58 changes: 58 additions & 0 deletions tests/test-msi.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

use std/assert
use std/testing *

const RELEASE_TAG = 'v0.104.1'

@before-all
def setup [] {
mkdir msi-pkgs
cd msi-pkgs
let arch = $nu.os-info.arch
gh release download $RELEASE_TAG --repo nushell/nightly --pattern $"*-($arch)-*.msi"
let msi = ls | where name =~ msi | get name.0
print $'MSI File: ($msi)'
let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu'
{ msi: $msi, install_dir: $install_dir }
}

@test
def 'msi-install:MSI should exists' [] {
let pkg = $in.msi
cd msi-pkgs
let package = ls $pkg
assert equal ($package | length) 1
assert greater ($package | get size.0) 15mb
}

@test
def 'msi-install:MSI should install successfully for per-user' [] {
let pkg = $in.msi
let install_dir = $in.install_dir
let profile = $'($nu.home-path)\AppData\Local\Microsoft\Windows Terminal\Fragments\nu\nu.json'
const BINS = [
nu.exe,
nu_plugin_inc.exe,
nu_plugin_gstat.exe,
nu_plugin_query.exe,
nu_plugin_polars.exe,
nu_plugin_formats.exe,
]
cd msi-pkgs

print 'Using msiexec to test MSI installation'
# msiexec /i $pkg ALLUSERS=1 /a /quiet /qn /L*V install.txt
msiexec /i $pkg MSIINSTALLPERUSER=1 /quiet /qn /L*V install.txt
# print (open -r install.txt)
let environment = registry query --hkcu environment
| where name == Path | get 0.value
print $"Path Environment: \n($environment)"
let contents = ls -s $install_dir
let bins = ls -s $'($install_dir)\bin'
assert greater ($bins | length) 5
assert greater ($contents | length) 3
assert equal ($profile | path exists) true
assert equal ($environment | str contains $install_dir) true
assert equal ($BINS | all {|it| $it in ($bins | get name) }) true
assert equal ([License.rtf README.txt nu.ico bin] | all {|it| $it in ($contents | get name) }) true
}
37 changes: 37 additions & 0 deletions tests/winget-install.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

use std/assert

def main [--scope: string] {
let install_dir = $'($nu.home-path)\AppData\Local\Programs\nu'
let profile = $'($nu.home-path)\AppData\Local\Microsoft\Windows Terminal\Fragments\nu\nu.json'
const BINS = [
nu.exe,
nu_plugin_inc.exe,
nu_plugin_gstat.exe,
nu_plugin_query.exe,
nu_plugin_polars.exe,
nu_plugin_formats.exe,
]

let scope_tip = if $scope in [user, machine] { $'($scope) scope' } else { $'default scope' }
print $'Using winget to test MSI (ansi g)($scope_tip)(ansi reset) installation'
let args = [--accept-source-agreements --accept-package-agreements --silent]
let scope_arg = if $scope in [user, machine] { [--scope $scope] } else { [] }
winget settings --enable LocalManifestFiles
winget install --manifest manifests\n\Nushell\Nushell\0.104.1 ...$args ...$scope_arg
let environment = registry query --hkcu environment
| where name == Path | get 0.value
print $"Path Environment: \n($environment)"
let contents = ls -s $install_dir
let bins = ls -s $'($install_dir)\bin'
assert greater ($bins | length) 5
assert greater ($contents | length) 3
assert equal ($profile | path exists) true
print $'(ansi g)Windows Terminal Profile setup sucessfully...(ansi reset)'
assert equal ($environment | str contains $install_dir) true
print $'(ansi g)Path environment setup sucessfully...(ansi reset)'
assert equal ($BINS | all {|it| $it in ($bins | get name) }) true
assert equal ([License.rtf README.txt nu.ico bin] | all {|it| $it in ($contents | get name) }) true
print $'(ansi g)Nu binaries installed sucessfully...(ansi reset)'
^$'($install_dir)\bin\nu.exe' -c 'version'
}