fp9 #233
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nu Module Test 2 | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/* | |
paths-ignore: | |
- '**.md' | |
defaults: | |
run: | |
shell: nu {0} | |
jobs: | |
test-latest: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-22.04, macos-latest] | |
ver: [0.93.0, 0.92.2, 0.91.0, 0.90.1, 0.87.1, 0.86, 0.85] | |
runs-on: ${{ matrix.os }} | |
name: test (${{matrix.os}}, nu@${{matrix.ver}}) | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Setup nu@latest | |
uses: hustcer/setup-nu@develop | |
with: | |
enable-plugins: false | |
version: ${{matrix.ver}} | |
- name: Show Nu Version and NU_LIB_DIRS | |
run: | | |
print $'Nu version info:(char nl)'; print (version) | |
print 'NU_LIB_DIRS:' | |
$env.NU_LIB_DIRS | print | |
- name: Prepare Nu Modules | |
run: | | |
# Linux: '/home/runner/.config/nushell' | |
# Windows: 'C:/Users/runneradmin/AppData/Roaming/nushell' | |
# Darwin: '/Users/runner/Library/Application Support/nushell' | |
let LIB_DIR = [$nu.default-config-dir 'scripts'] | path join | |
if not ($LIB_DIR | path exists) { mkdir $LIB_DIR } | |
cp -r nu/* $LIB_DIR | |
print $'Contents of ($LIB_DIR):' | |
ls $LIB_DIR | |
- name: Use Your Nu Modules | |
run: | | |
use module.nu * | |
print (get-env 'ABC-XYZ' 'DEFAULT-ABC-XYZ') |