Skip to content

misc(ci): Add GitHub Actions Workflow (PR #1) #24

misc(ci): Add GitHub Actions Workflow (PR #1)

misc(ci): Add GitHub Actions Workflow (PR #1) #24

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Nushell
env:
VERSION: '0.101.0'
FILENAMEBASE: nu-${VERSION}-x86_64-unknown-linux-musl
FILENAMEPACK: nu-${VERSION}-x86_64-unknown-linux-musl.tar.gz
run: |
set -e
wget --no-verbose https://github.com/nushell/nushell/releases/download/${{env.VERSION}}/${{env.FILENAMEPACK}}
tar xf ${{env.FILENAMEPACK}}
mv ${{env.FILENAMEBASE}} nu
chmod u+x nu/nu
- name: Set up nu_scripts
run: git clone --branch main --depth 1 https://github.com/nushell/nu_scripts.git
- name: Set up app deps
run: |
set -e
wget --no-verbose https://starship.rs/install.sh
chmod u+x install.sh
./install.sh --force
- name: Test
run: |
set -e
# https://github.com/nushell/nushell/issues/14745
# nu/nu --env-config env.nu --config config.nu -c 'echo $env.NU_VERSION'
echo Testing env.nu
nu/nu -c 'source env.nu'
echo Testing config.nu
nu/nu --env-config env.nu -c 'source config.nu'
echo Testing env and config
nu/nu --env-config env.nu --config config.nu -c 'echo $env.NU_VERSION'