-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (46 loc) · 1.84 KB
/
test-suite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: test suite
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
NU_VERSION: 0.100.0
BASH_ENV_JSON_VERSION: 0.7.0
jobs:
test:
name: Test
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Nushell $NU_VERSION
run: |
curl -L https://github.com/nushell/nushell/releases/download/${NU_VERSION}/nu-${NU_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
- name: Version Check
run: |
export PATH=./nu-${NU_VERSION}-x86_64-unknown-linux-gnu:$PATH
nu --version
bash --version
jq --version
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build
- name: Run Plugin Tests
run: |
export PATH=./nu-${NU_VERSION}-x86_64-unknown-linux-gnu:$PATH
nu --no-config-file --no-history -c "plugin add --plugin-config plugin.msgpackz target/debug/nu_plugin_bash_env"
nu --no-config-file --no-history -c "plugin use --plugin-config plugin.msgpackz bash_env ; use tests.nu run_bash_env_tests ; run_bash_env_tests"
- name: Download bash-env-json $BASH_ENV_JSON_VERSION
run: |
curl -L https://github.com/tesujimath/bash-env-json/archive/refs/tags/${BASH_ENV_JSON_VERSION}.tar.gz | tar xzf -
- name: Run Module Tests
run: |
# note that Nushell doesn't like relative paths on the $PATH
export PATH=$(pwd)/bash-env-json-${BASH_ENV_JSON_VERSION}:./nu-${NU_VERSION}-x86_64-unknown-linux-gnu:$PATH
which bash-env-json
nu --no-config-file --no-history -c "use bash-env.nu ; use tests.nu run_bash_env_tests ; run_bash_env_tests"
nu --no-config-file --no-history -c "use bash-env.nu ; use extra-module-tests.nu ; extra-module-tests"